From d42da04e5d1d3c15da690119d4934e33daa2919d Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Tue, 6 Jun 2017 23:02:14 -0700 Subject: [PATCH 1/2] Initial add of generated code, update readme, add settings file. --- .gitignore | 3 + README.md | 26 + csharp.settings | 3 + src/csharp.csproj | 10 + src/generated/IKubernetes.cs | 13775 +++ src/generated/Kubernetes.cs | 88817 ++++++++++++++++ src/generated/KubernetesExtensions.cs | 30081 ++++++ src/generated/Models/Appsv1beta1Deployment.cs | 109 + .../Models/Appsv1beta1DeploymentCondition.cs | 113 + .../Models/Appsv1beta1DeploymentList.cs | 111 + .../Models/Appsv1beta1DeploymentRollback.cs | 119 + .../Models/Appsv1beta1DeploymentSpec.cs | 165 + .../Models/Appsv1beta1DeploymentStatus.cs | 113 + .../Models/Appsv1beta1DeploymentStrategy.cs | 60 + .../Models/Appsv1beta1RollbackConfig.cs | 44 + .../Appsv1beta1RollingUpdateDeployment.cs | 93 + src/generated/Models/Appsv1beta1Scale.cs | 114 + src/generated/Models/Appsv1beta1ScaleSpec.cs | 46 + .../Models/Appsv1beta1ScaleStatus.cs | 92 + .../Models/Extensionsv1beta1Deployment.cs | 111 + .../Extensionsv1beta1DeploymentCondition.cs | 113 + .../Models/Extensionsv1beta1DeploymentList.cs | 113 + .../Extensionsv1beta1DeploymentRollback.cs | 119 + .../Models/Extensionsv1beta1DeploymentSpec.cs | 169 + .../Extensionsv1beta1DeploymentStatus.cs | 113 + .../Extensionsv1beta1DeploymentStrategy.cs | 60 + .../Models/Extensionsv1beta1RollbackConfig.cs | 46 + ...xtensionsv1beta1RollingUpdateDeployment.cs | 94 + .../Models/Extensionsv1beta1Scale.cs | 114 + .../Models/Extensionsv1beta1ScaleSpec.cs | 46 + .../Models/Extensionsv1beta1ScaleStatus.cs | 94 + src/generated/Models/RuntimeRawExtension.cs | 96 + src/generated/Models/V1APIGroup.cs | 173 + src/generated/Models/V1APIGroupList.cs | 104 + src/generated/Models/V1APIResource.cs | 112 + src/generated/Models/V1APIResourceList.cs | 121 + src/generated/Models/V1APIVersions.cs | 136 + .../V1AWSElasticBlockStoreVolumeSource.cs | 116 + src/generated/Models/V1Affinity.cs | 83 + src/generated/Models/V1AttachedVolume.cs | 73 + .../Models/V1AzureDiskVolumeSource.cs | 106 + .../Models/V1AzureFileVolumeSource.cs | 85 + src/generated/Models/V1Binding.cs | 104 + src/generated/Models/V1Capabilities.cs | 55 + src/generated/Models/V1CephFSVolumeSource.cs | 126 + src/generated/Models/V1CinderVolumeSource.cs | 94 + src/generated/Models/V1ComponentCondition.cs | 95 + src/generated/Models/V1ComponentStatus.cs | 91 + src/generated/Models/V1ComponentStatusList.cs | 104 + src/generated/Models/V1ConfigMap.cs | 91 + src/generated/Models/V1ConfigMapEnvSource.cs | 60 + .../Models/V1ConfigMapKeySelector.cs | 79 + src/generated/Models/V1ConfigMapList.cs | 103 + src/generated/Models/V1ConfigMapProjection.cs | 87 + .../Models/V1ConfigMapVolumeSource.cs | 104 + src/generated/Models/V1Container.cs | 402 + src/generated/Models/V1ContainerImage.cs | 73 + src/generated/Models/V1ContainerPort.cs | 104 + src/generated/Models/V1ContainerState.cs | 77 + .../Models/V1ContainerStateRunning.cs | 46 + .../Models/V1ContainerStateTerminated.cs | 114 + .../Models/V1ContainerStateWaiting.cs | 56 + src/generated/Models/V1ContainerStatus.cs | 153 + .../Models/V1CrossVersionObjectReference.cs | 86 + src/generated/Models/V1DaemonEndpoint.cs | 55 + src/generated/Models/V1DeleteOptions.cs | 129 + .../Models/V1DownwardAPIProjection.cs | 50 + .../Models/V1DownwardAPIVolumeFile.cs | 112 + .../Models/V1DownwardAPIVolumeSource.cs | 67 + .../Models/V1EmptyDirVolumeSource.cs | 52 + src/generated/Models/V1EndpointAddress.cs | 94 + src/generated/Models/V1EndpointPort.cs | 77 + src/generated/Models/V1EndpointSubset.cs | 83 + src/generated/Models/V1Endpoints.cs | 129 + src/generated/Models/V1EndpointsList.cs | 113 + src/generated/Models/V1EnvFromSource.cs | 63 + src/generated/Models/V1EnvVar.cs | 95 + src/generated/Models/V1EnvVarSource.cs | 104 + src/generated/Models/V1Event.cs | 177 + src/generated/Models/V1EventList.cs | 113 + src/generated/Models/V1EventSource.cs | 55 + src/generated/Models/V1ExecAction.cs | 59 + src/generated/Models/V1FCVolumeSource.cs | 95 + src/generated/Models/V1FlexVolumeSource.cs | 114 + src/generated/Models/V1FlockerVolumeSource.cs | 60 + .../Models/V1GCEPersistentDiskVolumeSource.cs | 116 + src/generated/Models/V1GitRepoVolumeSource.cs | 85 + .../Models/V1GlusterfsVolumeSource.cs | 92 + .../Models/V1GroupVersionForDiscovery.cs | 78 + src/generated/Models/V1HTTPGetAction.cs | 113 + src/generated/Models/V1HTTPHeader.cs | 71 + src/generated/Models/V1Handler.cs | 83 + .../Models/V1HorizontalPodAutoscaler.cs | 115 + .../Models/V1HorizontalPodAutoscalerList.cs | 114 + .../Models/V1HorizontalPodAutoscalerSpec.cs | 104 + .../Models/V1HorizontalPodAutoscalerStatus.cs | 103 + .../Models/V1HostPathVolumeSource.cs | 62 + src/generated/Models/V1ISCSIVolumeSource.cs | 135 + src/generated/Models/V1Job.cs | 116 + src/generated/Models/V1JobCondition.cs | 111 + src/generated/Models/V1JobList.cs | 113 + src/generated/Models/V1JobSpec.cs | 158 + src/generated/Models/V1JobStatus.cs | 108 + src/generated/Models/V1KeyToPath.cs | 91 + src/generated/Models/V1LabelSelector.cs | 67 + .../Models/V1LabelSelectorRequirement.cs | 92 + src/generated/Models/V1Lifecycle.cs | 95 + src/generated/Models/V1LimitRange.cs | 103 + src/generated/Models/V1LimitRangeItem.cs | 103 + src/generated/Models/V1LimitRangeList.cs | 116 + src/generated/Models/V1LimitRangeSpec.cs | 64 + src/generated/Models/V1ListMeta.cs | 67 + src/generated/Models/V1LoadBalancerIngress.cs | 59 + src/generated/Models/V1LoadBalancerStatus.cs | 51 + .../Models/V1LocalObjectReference.cs | 48 + .../Models/V1LocalSubjectAccessReview.cs | 118 + src/generated/Models/V1NFSVolumeSource.cs | 89 + src/generated/Models/V1Namespace.cs | 103 + src/generated/Models/V1NamespaceList.cs | 106 + src/generated/Models/V1NamespaceSpec.cs | 52 + src/generated/Models/V1NamespaceStatus.cs | 49 + src/generated/Models/V1Node.cs | 115 + src/generated/Models/V1NodeAddress.cs | 73 + src/generated/Models/V1NodeAffinity.cs | 108 + src/generated/Models/V1NodeCondition.cs | 110 + src/generated/Models/V1NodeDaemonEndpoints.cs | 59 + src/generated/Models/V1NodeList.cs | 114 + src/generated/Models/V1NodeSelector.cs | 75 + .../Models/V1NodeSelectorRequirement.cs | 96 + src/generated/Models/V1NodeSelectorTerm.cs | 73 + src/generated/Models/V1NodeSpec.cs | 92 + src/generated/Models/V1NodeStatus.cs | 206 + src/generated/Models/V1NodeSystemInfo.cs | 190 + .../Models/V1NonResourceAttributes.cs | 54 + src/generated/Models/V1ObjectFieldSelector.cs | 71 + src/generated/Models/V1ObjectMeta.cs | 353 + src/generated/Models/V1ObjectReference.cs | 123 + src/generated/Models/V1OwnerReference.cs | 130 + src/generated/Models/V1PersistentVolume.cs | 121 + .../Models/V1PersistentVolumeClaim.cs | 105 + .../Models/V1PersistentVolumeClaimList.cs | 107 + .../Models/V1PersistentVolumeClaimSpec.cs | 97 + .../Models/V1PersistentVolumeClaimStatus.cs | 74 + .../V1PersistentVolumeClaimVolumeSource.cs | 80 + .../Models/V1PersistentVolumeList.cs | 115 + .../Models/V1PersistentVolumeSpec.cs | 411 + .../Models/V1PersistentVolumeStatus.cs | 71 + .../V1PhotonPersistentDiskVolumeSource.cs | 74 + src/generated/Models/V1Pod.cs | 119 + src/generated/Models/V1PodAffinity.cs | 111 + src/generated/Models/V1PodAffinityTerm.cs | 93 + src/generated/Models/V1PodAntiAffinity.cs | 114 + src/generated/Models/V1PodCondition.cs | 118 + src/generated/Models/V1PodList.cs | 115 + src/generated/Models/V1PodSecurityContext.cs | 135 + src/generated/Models/V1PodSpec.cs | 395 + src/generated/Models/V1PodStatus.cs | 155 + src/generated/Models/V1PodTemplate.cs | 105 + src/generated/Models/V1PodTemplateList.cs | 113 + src/generated/Models/V1PodTemplateSpec.cs | 73 + .../Models/V1PortworxVolumeSource.cs | 84 + src/generated/Models/V1Preconditions.cs | 46 + .../Models/V1PreferredSchedulingTerm.cs | 77 + src/generated/Models/V1Probe.cs | 144 + .../Models/V1ProjectedVolumeSource.cs | 77 + src/generated/Models/V1QuobyteVolumeSource.cs | 110 + src/generated/Models/V1RBDVolumeSource.cs | 152 + .../Models/V1ReplicationController.cs | 129 + .../V1ReplicationControllerCondition.cs | 105 + .../Models/V1ReplicationControllerList.cs | 117 + .../Models/V1ReplicationControllerSpec.cs | 116 + .../Models/V1ReplicationControllerStatus.cs | 126 + src/generated/Models/V1ResourceAttributes.cs | 118 + .../Models/V1ResourceFieldSelector.cs | 80 + src/generated/Models/V1ResourceQuota.cs | 101 + src/generated/Models/V1ResourceQuotaList.cs | 106 + src/generated/Models/V1ResourceQuotaSpec.cs | 63 + src/generated/Models/V1ResourceQuotaStatus.cs | 61 + .../Models/V1ResourceRequirements.cs | 67 + src/generated/Models/V1SELinuxOptions.cs | 77 + src/generated/Models/V1Scale.cs | 114 + src/generated/Models/V1ScaleIOVolumeSource.cs | 164 + src/generated/Models/V1ScaleSpec.cs | 46 + src/generated/Models/V1ScaleStatus.cs | 74 + src/generated/Models/V1Secret.cs | 125 + src/generated/Models/V1SecretEnvSource.cs | 60 + src/generated/Models/V1SecretKeySelector.cs | 80 + src/generated/Models/V1SecretList.cs | 105 + src/generated/Models/V1SecretProjection.cs | 85 + src/generated/Models/V1SecretVolumeSource.cs | 103 + src/generated/Models/V1SecurityContext.cs | 128 + .../Models/V1SelfSubjectAccessReview.cs | 116 + .../Models/V1SelfSubjectAccessReviewSpec.cs | 61 + .../Models/V1ServerAddressByClientCIDR.cs | 82 + src/generated/Models/V1Service.cs | 104 + src/generated/Models/V1ServiceAccount.cs | 128 + src/generated/Models/V1ServiceAccountList.cs | 105 + src/generated/Models/V1ServiceList.cs | 103 + src/generated/Models/V1ServicePort.cs | 124 + src/generated/Models/V1ServiceSpec.cs | 233 + src/generated/Models/V1ServiceStatus.cs | 47 + src/generated/Models/V1Status.cs | 139 + src/generated/Models/V1StatusCause.cs | 85 + src/generated/Models/V1StatusDetails.cs | 102 + src/generated/Models/V1StorageClass.cs | 119 + src/generated/Models/V1StorageClassList.cs | 113 + src/generated/Models/V1SubjectAccessReview.cs | 114 + .../Models/V1SubjectAccessReviewSpec.cs | 94 + .../Models/V1SubjectAccessReviewStatus.cs | 87 + src/generated/Models/V1TCPSocketAction.cs | 63 + src/generated/Models/V1Taint.cs | 97 + src/generated/Models/V1TokenReview.cs | 111 + src/generated/Models/V1TokenReviewSpec.cs | 45 + src/generated/Models/V1TokenReviewStatus.cs | 66 + src/generated/Models/V1Toleration.cs | 109 + src/generated/Models/V1UserInfo.cs | 81 + src/generated/Models/V1Volume.cs | 451 + src/generated/Models/V1VolumeMount.cs | 95 + src/generated/Models/V1VolumeProjection.cs | 65 + .../V1VsphereVirtualDiskVolumeSource.cs | 74 + src/generated/Models/V1WatchEvent.cs | 85 + .../Models/V1WeightedPodAffinityTerm.cs | 72 + src/generated/Models/V1alpha1ClusterRole.cs | 113 + .../Models/V1alpha1ClusterRoleBinding.cs | 135 + .../Models/V1alpha1ClusterRoleBindingList.cs | 113 + .../Models/V1alpha1ClusterRoleList.cs | 111 + src/generated/Models/V1alpha1PodPreset.cs | 82 + src/generated/Models/V1alpha1PodPresetList.cs | 103 + src/generated/Models/V1alpha1PodPresetSpec.cs | 89 + src/generated/Models/V1alpha1PolicyRule.cs | 127 + src/generated/Models/V1alpha1Role.cs | 113 + src/generated/Models/V1alpha1RoleBinding.cs | 137 + .../Models/V1alpha1RoleBindingList.cs | 111 + src/generated/Models/V1alpha1RoleList.cs | 111 + src/generated/Models/V1alpha1RoleRef.cs | 87 + src/generated/Models/V1alpha1Subject.cs | 106 + src/generated/Models/V1beta1APIVersion.cs | 45 + .../V1beta1CertificateSigningRequest.cs | 108 + ...beta1CertificateSigningRequestCondition.cs | 86 + .../V1beta1CertificateSigningRequestList.cs | 106 + .../V1beta1CertificateSigningRequestSpec.cs | 119 + .../V1beta1CertificateSigningRequestStatus.cs | 58 + src/generated/Models/V1beta1ClusterRole.cs | 113 + .../Models/V1beta1ClusterRoleBinding.cs | 135 + .../Models/V1beta1ClusterRoleBindingList.cs | 113 + .../Models/V1beta1ClusterRoleList.cs | 111 + src/generated/Models/V1beta1DaemonSet.cs | 121 + src/generated/Models/V1beta1DaemonSetList.cs | 113 + src/generated/Models/V1beta1DaemonSetSpec.cs | 122 + .../Models/V1beta1DaemonSetStatus.cs | 142 + .../Models/V1beta1DaemonSetUpdateStrategy.cs | 56 + src/generated/Models/V1beta1Eviction.cs | 89 + .../Models/V1beta1FSGroupStrategyOptions.cs | 64 + .../Models/V1beta1HTTPIngressPath.cs | 86 + .../Models/V1beta1HTTPIngressRuleValue.cs | 78 + src/generated/Models/V1beta1HostPortRange.cs | 65 + src/generated/Models/V1beta1IDRange.cs | 63 + src/generated/Models/V1beta1Ingress.cs | 117 + src/generated/Models/V1beta1IngressBackend.cs | 73 + src/generated/Models/V1beta1IngressList.cs | 113 + src/generated/Models/V1beta1IngressRule.cs | 91 + src/generated/Models/V1beta1IngressSpec.cs | 106 + src/generated/Models/V1beta1IngressStatus.cs | 47 + src/generated/Models/V1beta1IngressTLS.cs | 74 + .../Models/V1beta1LocalSubjectAccessReview.cs | 120 + src/generated/Models/V1beta1NetworkPolicy.cs | 99 + .../Models/V1beta1NetworkPolicyIngressRule.cs | 86 + .../Models/V1beta1NetworkPolicyList.cs | 113 + .../Models/V1beta1NetworkPolicyPeer.cs | 65 + .../Models/V1beta1NetworkPolicyPort.cs | 60 + .../Models/V1beta1NetworkPolicySpec.cs | 96 + .../Models/V1beta1NonResourceAttributes.cs | 56 + .../Models/V1beta1PodDisruptionBudget.cs | 109 + .../Models/V1beta1PodDisruptionBudgetList.cs | 109 + .../Models/V1beta1PodDisruptionBudgetSpec.cs | 64 + .../V1beta1PodDisruptionBudgetStatus.cs | 137 + .../Models/V1beta1PodSecurityPolicy.cs | 101 + .../Models/V1beta1PodSecurityPolicyList.cs | 115 + .../Models/V1beta1PodSecurityPolicySpec.cs | 248 + src/generated/Models/V1beta1PolicyRule.cs | 123 + src/generated/Models/V1beta1ReplicaSet.cs | 126 + .../Models/V1beta1ReplicaSetCondition.cs | 102 + src/generated/Models/V1beta1ReplicaSetList.cs | 115 + src/generated/Models/V1beta1ReplicaSetSpec.cs | 108 + .../Models/V1beta1ReplicaSetStatus.cs | 120 + .../Models/V1beta1ResourceAttributes.cs | 118 + src/generated/Models/V1beta1Role.cs | 113 + src/generated/Models/V1beta1RoleBinding.cs | 137 + .../Models/V1beta1RoleBindingList.cs | 111 + src/generated/Models/V1beta1RoleList.cs | 111 + src/generated/Models/V1beta1RoleRef.cs | 87 + .../Models/V1beta1RollingUpdateDaemonSet.cs | 73 + .../Models/V1beta1RunAsUserStrategyOptions.cs | 86 + .../Models/V1beta1SELinuxStrategyOptions.cs | 76 + .../Models/V1beta1SelfSubjectAccessReview.cs | 118 + .../V1beta1SelfSubjectAccessReviewSpec.cs | 61 + src/generated/Models/V1beta1StatefulSet.cs | 118 + .../Models/V1beta1StatefulSetList.cs | 107 + .../Models/V1beta1StatefulSetSpec.cs | 144 + .../Models/V1beta1StatefulSetStatus.cs | 65 + src/generated/Models/V1beta1StorageClass.cs | 119 + .../Models/V1beta1StorageClassList.cs | 113 + src/generated/Models/V1beta1Subject.cs | 105 + .../Models/V1beta1SubjectAccessReview.cs | 114 + .../Models/V1beta1SubjectAccessReviewSpec.cs | 96 + .../V1beta1SubjectAccessReviewStatus.cs | 87 + ...1beta1SupplementalGroupsStrategyOptions.cs | 64 + .../Models/V1beta1ThirdPartyResource.cs | 99 + .../Models/V1beta1ThirdPartyResourceList.cs | 104 + src/generated/Models/V1beta1TokenReview.cs | 111 + .../Models/V1beta1TokenReviewSpec.cs | 45 + .../Models/V1beta1TokenReviewStatus.cs | 66 + src/generated/Models/V1beta1UserInfo.cs | 81 + src/generated/Models/V2alpha1CronJob.cs | 116 + src/generated/Models/V2alpha1CronJobList.cs | 113 + src/generated/Models/V2alpha1CronJobSpec.cs | 137 + src/generated/Models/V2alpha1CronJobStatus.cs | 59 + .../V2alpha1CrossVersionObjectReference.cs | 86 + .../Models/V2alpha1HorizontalPodAutoscaler.cs | 124 + .../V2alpha1HorizontalPodAutoscalerList.cs | 116 + .../V2alpha1HorizontalPodAutoscalerSpec.cs | 129 + .../V2alpha1HorizontalPodAutoscalerStatus.cs | 122 + .../Models/V2alpha1JobTemplateSpec.cs | 75 + src/generated/Models/V2alpha1MetricSpec.cs | 118 + src/generated/Models/V2alpha1MetricStatus.cs | 117 + .../Models/V2alpha1ObjectMetricSource.cs | 92 + .../Models/V2alpha1ObjectMetricStatus.cs | 92 + .../Models/V2alpha1PodsMetricSource.cs | 78 + .../Models/V2alpha1PodsMetricStatus.cs | 77 + .../Models/V2alpha1ResourceMetricSource.cs | 96 + .../Models/V2alpha1ResourceMetricStatus.cs | 105 + src/generated/Models/VersionInfo.cs | 138 + src/generated/swagger.json | 42455 ++++++++ 333 files changed, 208792 insertions(+) create mode 100644 .gitignore create mode 100644 csharp.settings create mode 100755 src/csharp.csproj create mode 100755 src/generated/IKubernetes.cs create mode 100755 src/generated/Kubernetes.cs create mode 100755 src/generated/KubernetesExtensions.cs create mode 100755 src/generated/Models/Appsv1beta1Deployment.cs create mode 100755 src/generated/Models/Appsv1beta1DeploymentCondition.cs create mode 100755 src/generated/Models/Appsv1beta1DeploymentList.cs create mode 100755 src/generated/Models/Appsv1beta1DeploymentRollback.cs create mode 100755 src/generated/Models/Appsv1beta1DeploymentSpec.cs create mode 100755 src/generated/Models/Appsv1beta1DeploymentStatus.cs create mode 100755 src/generated/Models/Appsv1beta1DeploymentStrategy.cs create mode 100755 src/generated/Models/Appsv1beta1RollbackConfig.cs create mode 100755 src/generated/Models/Appsv1beta1RollingUpdateDeployment.cs create mode 100755 src/generated/Models/Appsv1beta1Scale.cs create mode 100755 src/generated/Models/Appsv1beta1ScaleSpec.cs create mode 100755 src/generated/Models/Appsv1beta1ScaleStatus.cs create mode 100755 src/generated/Models/Extensionsv1beta1Deployment.cs create mode 100755 src/generated/Models/Extensionsv1beta1DeploymentCondition.cs create mode 100755 src/generated/Models/Extensionsv1beta1DeploymentList.cs create mode 100755 src/generated/Models/Extensionsv1beta1DeploymentRollback.cs create mode 100755 src/generated/Models/Extensionsv1beta1DeploymentSpec.cs create mode 100755 src/generated/Models/Extensionsv1beta1DeploymentStatus.cs create mode 100755 src/generated/Models/Extensionsv1beta1DeploymentStrategy.cs create mode 100755 src/generated/Models/Extensionsv1beta1RollbackConfig.cs create mode 100755 src/generated/Models/Extensionsv1beta1RollingUpdateDeployment.cs create mode 100755 src/generated/Models/Extensionsv1beta1Scale.cs create mode 100755 src/generated/Models/Extensionsv1beta1ScaleSpec.cs create mode 100755 src/generated/Models/Extensionsv1beta1ScaleStatus.cs create mode 100755 src/generated/Models/RuntimeRawExtension.cs create mode 100755 src/generated/Models/V1APIGroup.cs create mode 100755 src/generated/Models/V1APIGroupList.cs create mode 100755 src/generated/Models/V1APIResource.cs create mode 100755 src/generated/Models/V1APIResourceList.cs create mode 100755 src/generated/Models/V1APIVersions.cs create mode 100755 src/generated/Models/V1AWSElasticBlockStoreVolumeSource.cs create mode 100755 src/generated/Models/V1Affinity.cs create mode 100755 src/generated/Models/V1AttachedVolume.cs create mode 100755 src/generated/Models/V1AzureDiskVolumeSource.cs create mode 100755 src/generated/Models/V1AzureFileVolumeSource.cs create mode 100755 src/generated/Models/V1Binding.cs create mode 100755 src/generated/Models/V1Capabilities.cs create mode 100755 src/generated/Models/V1CephFSVolumeSource.cs create mode 100755 src/generated/Models/V1CinderVolumeSource.cs create mode 100755 src/generated/Models/V1ComponentCondition.cs create mode 100755 src/generated/Models/V1ComponentStatus.cs create mode 100755 src/generated/Models/V1ComponentStatusList.cs create mode 100755 src/generated/Models/V1ConfigMap.cs create mode 100755 src/generated/Models/V1ConfigMapEnvSource.cs create mode 100755 src/generated/Models/V1ConfigMapKeySelector.cs create mode 100755 src/generated/Models/V1ConfigMapList.cs create mode 100755 src/generated/Models/V1ConfigMapProjection.cs create mode 100755 src/generated/Models/V1ConfigMapVolumeSource.cs create mode 100755 src/generated/Models/V1Container.cs create mode 100755 src/generated/Models/V1ContainerImage.cs create mode 100755 src/generated/Models/V1ContainerPort.cs create mode 100755 src/generated/Models/V1ContainerState.cs create mode 100755 src/generated/Models/V1ContainerStateRunning.cs create mode 100755 src/generated/Models/V1ContainerStateTerminated.cs create mode 100755 src/generated/Models/V1ContainerStateWaiting.cs create mode 100755 src/generated/Models/V1ContainerStatus.cs create mode 100755 src/generated/Models/V1CrossVersionObjectReference.cs create mode 100755 src/generated/Models/V1DaemonEndpoint.cs create mode 100755 src/generated/Models/V1DeleteOptions.cs create mode 100755 src/generated/Models/V1DownwardAPIProjection.cs create mode 100755 src/generated/Models/V1DownwardAPIVolumeFile.cs create mode 100755 src/generated/Models/V1DownwardAPIVolumeSource.cs create mode 100755 src/generated/Models/V1EmptyDirVolumeSource.cs create mode 100755 src/generated/Models/V1EndpointAddress.cs create mode 100755 src/generated/Models/V1EndpointPort.cs create mode 100755 src/generated/Models/V1EndpointSubset.cs create mode 100755 src/generated/Models/V1Endpoints.cs create mode 100755 src/generated/Models/V1EndpointsList.cs create mode 100755 src/generated/Models/V1EnvFromSource.cs create mode 100755 src/generated/Models/V1EnvVar.cs create mode 100755 src/generated/Models/V1EnvVarSource.cs create mode 100755 src/generated/Models/V1Event.cs create mode 100755 src/generated/Models/V1EventList.cs create mode 100755 src/generated/Models/V1EventSource.cs create mode 100755 src/generated/Models/V1ExecAction.cs create mode 100755 src/generated/Models/V1FCVolumeSource.cs create mode 100755 src/generated/Models/V1FlexVolumeSource.cs create mode 100755 src/generated/Models/V1FlockerVolumeSource.cs create mode 100755 src/generated/Models/V1GCEPersistentDiskVolumeSource.cs create mode 100755 src/generated/Models/V1GitRepoVolumeSource.cs create mode 100755 src/generated/Models/V1GlusterfsVolumeSource.cs create mode 100755 src/generated/Models/V1GroupVersionForDiscovery.cs create mode 100755 src/generated/Models/V1HTTPGetAction.cs create mode 100755 src/generated/Models/V1HTTPHeader.cs create mode 100755 src/generated/Models/V1Handler.cs create mode 100755 src/generated/Models/V1HorizontalPodAutoscaler.cs create mode 100755 src/generated/Models/V1HorizontalPodAutoscalerList.cs create mode 100755 src/generated/Models/V1HorizontalPodAutoscalerSpec.cs create mode 100755 src/generated/Models/V1HorizontalPodAutoscalerStatus.cs create mode 100755 src/generated/Models/V1HostPathVolumeSource.cs create mode 100755 src/generated/Models/V1ISCSIVolumeSource.cs create mode 100755 src/generated/Models/V1Job.cs create mode 100755 src/generated/Models/V1JobCondition.cs create mode 100755 src/generated/Models/V1JobList.cs create mode 100755 src/generated/Models/V1JobSpec.cs create mode 100755 src/generated/Models/V1JobStatus.cs create mode 100755 src/generated/Models/V1KeyToPath.cs create mode 100755 src/generated/Models/V1LabelSelector.cs create mode 100755 src/generated/Models/V1LabelSelectorRequirement.cs create mode 100755 src/generated/Models/V1Lifecycle.cs create mode 100755 src/generated/Models/V1LimitRange.cs create mode 100755 src/generated/Models/V1LimitRangeItem.cs create mode 100755 src/generated/Models/V1LimitRangeList.cs create mode 100755 src/generated/Models/V1LimitRangeSpec.cs create mode 100755 src/generated/Models/V1ListMeta.cs create mode 100755 src/generated/Models/V1LoadBalancerIngress.cs create mode 100755 src/generated/Models/V1LoadBalancerStatus.cs create mode 100755 src/generated/Models/V1LocalObjectReference.cs create mode 100755 src/generated/Models/V1LocalSubjectAccessReview.cs create mode 100755 src/generated/Models/V1NFSVolumeSource.cs create mode 100755 src/generated/Models/V1Namespace.cs create mode 100755 src/generated/Models/V1NamespaceList.cs create mode 100755 src/generated/Models/V1NamespaceSpec.cs create mode 100755 src/generated/Models/V1NamespaceStatus.cs create mode 100755 src/generated/Models/V1Node.cs create mode 100755 src/generated/Models/V1NodeAddress.cs create mode 100755 src/generated/Models/V1NodeAffinity.cs create mode 100755 src/generated/Models/V1NodeCondition.cs create mode 100755 src/generated/Models/V1NodeDaemonEndpoints.cs create mode 100755 src/generated/Models/V1NodeList.cs create mode 100755 src/generated/Models/V1NodeSelector.cs create mode 100755 src/generated/Models/V1NodeSelectorRequirement.cs create mode 100755 src/generated/Models/V1NodeSelectorTerm.cs create mode 100755 src/generated/Models/V1NodeSpec.cs create mode 100755 src/generated/Models/V1NodeStatus.cs create mode 100755 src/generated/Models/V1NodeSystemInfo.cs create mode 100755 src/generated/Models/V1NonResourceAttributes.cs create mode 100755 src/generated/Models/V1ObjectFieldSelector.cs create mode 100755 src/generated/Models/V1ObjectMeta.cs create mode 100755 src/generated/Models/V1ObjectReference.cs create mode 100755 src/generated/Models/V1OwnerReference.cs create mode 100755 src/generated/Models/V1PersistentVolume.cs create mode 100755 src/generated/Models/V1PersistentVolumeClaim.cs create mode 100755 src/generated/Models/V1PersistentVolumeClaimList.cs create mode 100755 src/generated/Models/V1PersistentVolumeClaimSpec.cs create mode 100755 src/generated/Models/V1PersistentVolumeClaimStatus.cs create mode 100755 src/generated/Models/V1PersistentVolumeClaimVolumeSource.cs create mode 100755 src/generated/Models/V1PersistentVolumeList.cs create mode 100755 src/generated/Models/V1PersistentVolumeSpec.cs create mode 100755 src/generated/Models/V1PersistentVolumeStatus.cs create mode 100755 src/generated/Models/V1PhotonPersistentDiskVolumeSource.cs create mode 100755 src/generated/Models/V1Pod.cs create mode 100755 src/generated/Models/V1PodAffinity.cs create mode 100755 src/generated/Models/V1PodAffinityTerm.cs create mode 100755 src/generated/Models/V1PodAntiAffinity.cs create mode 100755 src/generated/Models/V1PodCondition.cs create mode 100755 src/generated/Models/V1PodList.cs create mode 100755 src/generated/Models/V1PodSecurityContext.cs create mode 100755 src/generated/Models/V1PodSpec.cs create mode 100755 src/generated/Models/V1PodStatus.cs create mode 100755 src/generated/Models/V1PodTemplate.cs create mode 100755 src/generated/Models/V1PodTemplateList.cs create mode 100755 src/generated/Models/V1PodTemplateSpec.cs create mode 100755 src/generated/Models/V1PortworxVolumeSource.cs create mode 100755 src/generated/Models/V1Preconditions.cs create mode 100755 src/generated/Models/V1PreferredSchedulingTerm.cs create mode 100755 src/generated/Models/V1Probe.cs create mode 100755 src/generated/Models/V1ProjectedVolumeSource.cs create mode 100755 src/generated/Models/V1QuobyteVolumeSource.cs create mode 100755 src/generated/Models/V1RBDVolumeSource.cs create mode 100755 src/generated/Models/V1ReplicationController.cs create mode 100755 src/generated/Models/V1ReplicationControllerCondition.cs create mode 100755 src/generated/Models/V1ReplicationControllerList.cs create mode 100755 src/generated/Models/V1ReplicationControllerSpec.cs create mode 100755 src/generated/Models/V1ReplicationControllerStatus.cs create mode 100755 src/generated/Models/V1ResourceAttributes.cs create mode 100755 src/generated/Models/V1ResourceFieldSelector.cs create mode 100755 src/generated/Models/V1ResourceQuota.cs create mode 100755 src/generated/Models/V1ResourceQuotaList.cs create mode 100755 src/generated/Models/V1ResourceQuotaSpec.cs create mode 100755 src/generated/Models/V1ResourceQuotaStatus.cs create mode 100755 src/generated/Models/V1ResourceRequirements.cs create mode 100755 src/generated/Models/V1SELinuxOptions.cs create mode 100755 src/generated/Models/V1Scale.cs create mode 100755 src/generated/Models/V1ScaleIOVolumeSource.cs create mode 100755 src/generated/Models/V1ScaleSpec.cs create mode 100755 src/generated/Models/V1ScaleStatus.cs create mode 100755 src/generated/Models/V1Secret.cs create mode 100755 src/generated/Models/V1SecretEnvSource.cs create mode 100755 src/generated/Models/V1SecretKeySelector.cs create mode 100755 src/generated/Models/V1SecretList.cs create mode 100755 src/generated/Models/V1SecretProjection.cs create mode 100755 src/generated/Models/V1SecretVolumeSource.cs create mode 100755 src/generated/Models/V1SecurityContext.cs create mode 100755 src/generated/Models/V1SelfSubjectAccessReview.cs create mode 100755 src/generated/Models/V1SelfSubjectAccessReviewSpec.cs create mode 100755 src/generated/Models/V1ServerAddressByClientCIDR.cs create mode 100755 src/generated/Models/V1Service.cs create mode 100755 src/generated/Models/V1ServiceAccount.cs create mode 100755 src/generated/Models/V1ServiceAccountList.cs create mode 100755 src/generated/Models/V1ServiceList.cs create mode 100755 src/generated/Models/V1ServicePort.cs create mode 100755 src/generated/Models/V1ServiceSpec.cs create mode 100755 src/generated/Models/V1ServiceStatus.cs create mode 100755 src/generated/Models/V1Status.cs create mode 100755 src/generated/Models/V1StatusCause.cs create mode 100755 src/generated/Models/V1StatusDetails.cs create mode 100755 src/generated/Models/V1StorageClass.cs create mode 100755 src/generated/Models/V1StorageClassList.cs create mode 100755 src/generated/Models/V1SubjectAccessReview.cs create mode 100755 src/generated/Models/V1SubjectAccessReviewSpec.cs create mode 100755 src/generated/Models/V1SubjectAccessReviewStatus.cs create mode 100755 src/generated/Models/V1TCPSocketAction.cs create mode 100755 src/generated/Models/V1Taint.cs create mode 100755 src/generated/Models/V1TokenReview.cs create mode 100755 src/generated/Models/V1TokenReviewSpec.cs create mode 100755 src/generated/Models/V1TokenReviewStatus.cs create mode 100755 src/generated/Models/V1Toleration.cs create mode 100755 src/generated/Models/V1UserInfo.cs create mode 100755 src/generated/Models/V1Volume.cs create mode 100755 src/generated/Models/V1VolumeMount.cs create mode 100755 src/generated/Models/V1VolumeProjection.cs create mode 100755 src/generated/Models/V1VsphereVirtualDiskVolumeSource.cs create mode 100755 src/generated/Models/V1WatchEvent.cs create mode 100755 src/generated/Models/V1WeightedPodAffinityTerm.cs create mode 100755 src/generated/Models/V1alpha1ClusterRole.cs create mode 100755 src/generated/Models/V1alpha1ClusterRoleBinding.cs create mode 100755 src/generated/Models/V1alpha1ClusterRoleBindingList.cs create mode 100755 src/generated/Models/V1alpha1ClusterRoleList.cs create mode 100755 src/generated/Models/V1alpha1PodPreset.cs create mode 100755 src/generated/Models/V1alpha1PodPresetList.cs create mode 100755 src/generated/Models/V1alpha1PodPresetSpec.cs create mode 100755 src/generated/Models/V1alpha1PolicyRule.cs create mode 100755 src/generated/Models/V1alpha1Role.cs create mode 100755 src/generated/Models/V1alpha1RoleBinding.cs create mode 100755 src/generated/Models/V1alpha1RoleBindingList.cs create mode 100755 src/generated/Models/V1alpha1RoleList.cs create mode 100755 src/generated/Models/V1alpha1RoleRef.cs create mode 100755 src/generated/Models/V1alpha1Subject.cs create mode 100755 src/generated/Models/V1beta1APIVersion.cs create mode 100755 src/generated/Models/V1beta1CertificateSigningRequest.cs create mode 100755 src/generated/Models/V1beta1CertificateSigningRequestCondition.cs create mode 100755 src/generated/Models/V1beta1CertificateSigningRequestList.cs create mode 100755 src/generated/Models/V1beta1CertificateSigningRequestSpec.cs create mode 100755 src/generated/Models/V1beta1CertificateSigningRequestStatus.cs create mode 100755 src/generated/Models/V1beta1ClusterRole.cs create mode 100755 src/generated/Models/V1beta1ClusterRoleBinding.cs create mode 100755 src/generated/Models/V1beta1ClusterRoleBindingList.cs create mode 100755 src/generated/Models/V1beta1ClusterRoleList.cs create mode 100755 src/generated/Models/V1beta1DaemonSet.cs create mode 100755 src/generated/Models/V1beta1DaemonSetList.cs create mode 100755 src/generated/Models/V1beta1DaemonSetSpec.cs create mode 100755 src/generated/Models/V1beta1DaemonSetStatus.cs create mode 100755 src/generated/Models/V1beta1DaemonSetUpdateStrategy.cs create mode 100755 src/generated/Models/V1beta1Eviction.cs create mode 100755 src/generated/Models/V1beta1FSGroupStrategyOptions.cs create mode 100755 src/generated/Models/V1beta1HTTPIngressPath.cs create mode 100755 src/generated/Models/V1beta1HTTPIngressRuleValue.cs create mode 100755 src/generated/Models/V1beta1HostPortRange.cs create mode 100755 src/generated/Models/V1beta1IDRange.cs create mode 100755 src/generated/Models/V1beta1Ingress.cs create mode 100755 src/generated/Models/V1beta1IngressBackend.cs create mode 100755 src/generated/Models/V1beta1IngressList.cs create mode 100755 src/generated/Models/V1beta1IngressRule.cs create mode 100755 src/generated/Models/V1beta1IngressSpec.cs create mode 100755 src/generated/Models/V1beta1IngressStatus.cs create mode 100755 src/generated/Models/V1beta1IngressTLS.cs create mode 100755 src/generated/Models/V1beta1LocalSubjectAccessReview.cs create mode 100755 src/generated/Models/V1beta1NetworkPolicy.cs create mode 100755 src/generated/Models/V1beta1NetworkPolicyIngressRule.cs create mode 100755 src/generated/Models/V1beta1NetworkPolicyList.cs create mode 100755 src/generated/Models/V1beta1NetworkPolicyPeer.cs create mode 100755 src/generated/Models/V1beta1NetworkPolicyPort.cs create mode 100755 src/generated/Models/V1beta1NetworkPolicySpec.cs create mode 100755 src/generated/Models/V1beta1NonResourceAttributes.cs create mode 100755 src/generated/Models/V1beta1PodDisruptionBudget.cs create mode 100755 src/generated/Models/V1beta1PodDisruptionBudgetList.cs create mode 100755 src/generated/Models/V1beta1PodDisruptionBudgetSpec.cs create mode 100755 src/generated/Models/V1beta1PodDisruptionBudgetStatus.cs create mode 100755 src/generated/Models/V1beta1PodSecurityPolicy.cs create mode 100755 src/generated/Models/V1beta1PodSecurityPolicyList.cs create mode 100755 src/generated/Models/V1beta1PodSecurityPolicySpec.cs create mode 100755 src/generated/Models/V1beta1PolicyRule.cs create mode 100755 src/generated/Models/V1beta1ReplicaSet.cs create mode 100755 src/generated/Models/V1beta1ReplicaSetCondition.cs create mode 100755 src/generated/Models/V1beta1ReplicaSetList.cs create mode 100755 src/generated/Models/V1beta1ReplicaSetSpec.cs create mode 100755 src/generated/Models/V1beta1ReplicaSetStatus.cs create mode 100755 src/generated/Models/V1beta1ResourceAttributes.cs create mode 100755 src/generated/Models/V1beta1Role.cs create mode 100755 src/generated/Models/V1beta1RoleBinding.cs create mode 100755 src/generated/Models/V1beta1RoleBindingList.cs create mode 100755 src/generated/Models/V1beta1RoleList.cs create mode 100755 src/generated/Models/V1beta1RoleRef.cs create mode 100755 src/generated/Models/V1beta1RollingUpdateDaemonSet.cs create mode 100755 src/generated/Models/V1beta1RunAsUserStrategyOptions.cs create mode 100755 src/generated/Models/V1beta1SELinuxStrategyOptions.cs create mode 100755 src/generated/Models/V1beta1SelfSubjectAccessReview.cs create mode 100755 src/generated/Models/V1beta1SelfSubjectAccessReviewSpec.cs create mode 100755 src/generated/Models/V1beta1StatefulSet.cs create mode 100755 src/generated/Models/V1beta1StatefulSetList.cs create mode 100755 src/generated/Models/V1beta1StatefulSetSpec.cs create mode 100755 src/generated/Models/V1beta1StatefulSetStatus.cs create mode 100755 src/generated/Models/V1beta1StorageClass.cs create mode 100755 src/generated/Models/V1beta1StorageClassList.cs create mode 100755 src/generated/Models/V1beta1Subject.cs create mode 100755 src/generated/Models/V1beta1SubjectAccessReview.cs create mode 100755 src/generated/Models/V1beta1SubjectAccessReviewSpec.cs create mode 100755 src/generated/Models/V1beta1SubjectAccessReviewStatus.cs create mode 100755 src/generated/Models/V1beta1SupplementalGroupsStrategyOptions.cs create mode 100755 src/generated/Models/V1beta1ThirdPartyResource.cs create mode 100755 src/generated/Models/V1beta1ThirdPartyResourceList.cs create mode 100755 src/generated/Models/V1beta1TokenReview.cs create mode 100755 src/generated/Models/V1beta1TokenReviewSpec.cs create mode 100755 src/generated/Models/V1beta1TokenReviewStatus.cs create mode 100755 src/generated/Models/V1beta1UserInfo.cs create mode 100755 src/generated/Models/V2alpha1CronJob.cs create mode 100755 src/generated/Models/V2alpha1CronJobList.cs create mode 100755 src/generated/Models/V2alpha1CronJobSpec.cs create mode 100755 src/generated/Models/V2alpha1CronJobStatus.cs create mode 100755 src/generated/Models/V2alpha1CrossVersionObjectReference.cs create mode 100755 src/generated/Models/V2alpha1HorizontalPodAutoscaler.cs create mode 100755 src/generated/Models/V2alpha1HorizontalPodAutoscalerList.cs create mode 100755 src/generated/Models/V2alpha1HorizontalPodAutoscalerSpec.cs create mode 100755 src/generated/Models/V2alpha1HorizontalPodAutoscalerStatus.cs create mode 100755 src/generated/Models/V2alpha1JobTemplateSpec.cs create mode 100755 src/generated/Models/V2alpha1MetricSpec.cs create mode 100755 src/generated/Models/V2alpha1MetricStatus.cs create mode 100755 src/generated/Models/V2alpha1ObjectMetricSource.cs create mode 100755 src/generated/Models/V2alpha1ObjectMetricStatus.cs create mode 100755 src/generated/Models/V2alpha1PodsMetricSource.cs create mode 100755 src/generated/Models/V2alpha1PodsMetricStatus.cs create mode 100755 src/generated/Models/V2alpha1ResourceMetricSource.cs create mode 100755 src/generated/Models/V2alpha1ResourceMetricStatus.cs create mode 100755 src/generated/Models/VersionInfo.cs create mode 100644 src/generated/swagger.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..4f268ff8b --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.vscode +obj/ +bin/ diff --git a/README.md b/README.md index 8cbc0fc27..9f2fbd6b6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,28 @@ # csharp Work In Progress + +# Generating the client code + +## Prerequisites + +Check out the generator project into some other directory +(henceforth `$GEN_DIR`) + +``` +cd $GEN_DIR/.. +git clone https://github.com/kubernetes-client/gen +``` + +Install the [`autorest` tool](https://github.com/azure/autorest): + +``` +npm install autorest +``` + +## Generating code + +``` +# Where REPO_DIR points to the root of the csharp repository +cd ${REPO_DIR}/csharp/src +${GEN_DIR}/openapi/csharp.sh generated csharp.settings +``` diff --git a/csharp.settings b/csharp.settings new file mode 100644 index 000000000..6888ac943 --- /dev/null +++ b/csharp.settings @@ -0,0 +1,3 @@ +export KUBERNETES_BRANCH=v1.6.0 +export CLIENT_VERSION=0.0.1 +export PACKAGE_NAME=k8s diff --git a/src/csharp.csproj b/src/csharp.csproj new file mode 100755 index 000000000..10f59b92b --- /dev/null +++ b/src/csharp.csproj @@ -0,0 +1,10 @@ + + + Library + netcoreapp1.1 + + + + + + \ No newline at end of file diff --git a/src/generated/IKubernetes.cs b/src/generated/IKubernetes.cs new file mode 100755 index 000000000..b9a828dcc --- /dev/null +++ b/src/generated/IKubernetes.cs @@ -0,0 +1,13775 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s +{ + using Microsoft.Rest; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// + public partial interface IKubernetes : System.IDisposable + { + /// + /// The base URI of the service. + /// + System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + JsonSerializerSettings SerializationSettings { get; } + + /// + /// Gets or sets json deserialization settings. + /// + JsonSerializerSettings DeserializationSettings { get; } + + + /// + /// get available API versions + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIVersionsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResourcesWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list objects of kind ComponentStatus + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListComponentStatusWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified ComponentStatus + /// + /// + /// name of the ComponentStatus + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadComponentStatusWithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ConfigMap + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListConfigMapForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Endpoints + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListEndpointsForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Event + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListEventForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind LimitRange + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListLimitRangeForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Namespace + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespaceWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a Namespace + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespaceWithHttpMessagesAsync(V1Namespace body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of Namespace + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespaceWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a Binding + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedBindingWithHttpMessagesAsync(V1Binding body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedConfigMapWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a ConfigMap + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedConfigMapWithHttpMessagesAsync(V1ConfigMap body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedConfigMapWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified ConfigMap + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedConfigMapWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified ConfigMap + /// + /// + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedConfigMapWithHttpMessagesAsync(V1ConfigMap body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a ConfigMap + /// + /// + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedConfigMapWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified ConfigMap + /// + /// + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedConfigMapWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedEndpointsWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create Endpoints + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedEndpointsWithHttpMessagesAsync(V1Endpoints body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedEndpointsWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Endpoints + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedEndpointsWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Endpoints + /// + /// + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedEndpointsWithHttpMessagesAsync(V1Endpoints body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete Endpoints + /// + /// + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedEndpointsWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Endpoints + /// + /// + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedEndpointsWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedEventWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create an Event + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedEventWithHttpMessagesAsync(V1Event body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedEventWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Event + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedEventWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Event + /// + /// + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedEventWithHttpMessagesAsync(V1Event body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete an Event + /// + /// + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedEventWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Event + /// + /// + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedEventWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedLimitRangeWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a LimitRange + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedLimitRangeWithHttpMessagesAsync(V1LimitRange body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedLimitRangeWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified LimitRange + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedLimitRangeWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified LimitRange + /// + /// + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedLimitRangeWithHttpMessagesAsync(V1LimitRange body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a LimitRange + /// + /// + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedLimitRangeWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified LimitRange + /// + /// + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedLimitRangeWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedPersistentVolumeClaimWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a PersistentVolumeClaim + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedPersistentVolumeClaimWithHttpMessagesAsync(V1PersistentVolumeClaim body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedPersistentVolumeClaimWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified PersistentVolumeClaim + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedPersistentVolumeClaimWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified PersistentVolumeClaim + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedPersistentVolumeClaimWithHttpMessagesAsync(V1PersistentVolumeClaim body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a PersistentVolumeClaim + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedPersistentVolumeClaimWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified PersistentVolumeClaim + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedPersistentVolumeClaimWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified PersistentVolumeClaim + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedPersistentVolumeClaimStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified PersistentVolumeClaim + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedPersistentVolumeClaimStatusWithHttpMessagesAsync(V1PersistentVolumeClaim body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified PersistentVolumeClaim + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedPersistentVolumeClaimStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedPodWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a Pod + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedPodWithHttpMessagesAsync(V1Pod body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedPodWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Pod + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedPodWithHttpMessagesAsync(V1Pod body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a Pod + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedPodWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Pod + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedPodWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect GET requests to attach of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The container in which to execute the command. Defaults to only + /// container if there is only one container in the pod. + /// + /// + /// Stderr if true indicates that stderr is to be redirected for the + /// attach call. Defaults to true. + /// + /// + /// Stdin if true, redirects the standard input stream of the pod for + /// this call. Defaults to false. + /// + /// + /// Stdout if true indicates that stdout is to be redirected for the + /// attach call. Defaults to true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the attach + /// call. This is passed through the container runtime so the tty is + /// allocated on the worker node by the container runtime. Defaults to + /// false. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectGetNamespacedPodAttachWithHttpMessagesAsync(string name, string namespaceParameter, string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect POST requests to attach of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The container in which to execute the command. Defaults to only + /// container if there is only one container in the pod. + /// + /// + /// Stderr if true indicates that stderr is to be redirected for the + /// attach call. Defaults to true. + /// + /// + /// Stdin if true, redirects the standard input stream of the pod for + /// this call. Defaults to false. + /// + /// + /// Stdout if true indicates that stdout is to be redirected for the + /// attach call. Defaults to true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the attach + /// call. This is passed through the container runtime so the tty is + /// allocated on the worker node by the container runtime. Defaults to + /// false. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPostNamespacedPodAttachWithHttpMessagesAsync(string name, string namespaceParameter, string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create binding of a Binding + /// + /// + /// + /// + /// name of the Binding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedBindingBindingWithHttpMessagesAsync(V1Binding body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create eviction of an Eviction + /// + /// + /// + /// + /// name of the Eviction + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedEvictionEvictionWithHttpMessagesAsync(V1beta1Eviction body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect GET requests to exec of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Command is the remote command to execute. argv array. Not executed + /// within a shell. + /// + /// + /// Container in which to execute the command. Defaults to only + /// container if there is only one container in the pod. + /// + /// + /// Redirect the standard error stream of the pod for this call. + /// Defaults to true. + /// + /// + /// Redirect the standard input stream of the pod for this call. + /// Defaults to false. + /// + /// + /// Redirect the standard output stream of the pod for this call. + /// Defaults to true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the exec + /// call. Defaults to false. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectGetNamespacedPodExecWithHttpMessagesAsync(string name, string namespaceParameter, string command = default(string), string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect POST requests to exec of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Command is the remote command to execute. argv array. Not executed + /// within a shell. + /// + /// + /// Container in which to execute the command. Defaults to only + /// container if there is only one container in the pod. + /// + /// + /// Redirect the standard error stream of the pod for this call. + /// Defaults to true. + /// + /// + /// Redirect the standard input stream of the pod for this call. + /// Defaults to false. + /// + /// + /// Redirect the standard output stream of the pod for this call. + /// Defaults to true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the exec + /// call. Defaults to false. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPostNamespacedPodExecWithHttpMessagesAsync(string name, string namespaceParameter, string command = default(string), string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read log of the specified Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The container for which to stream logs. Defaults to only container + /// if there is one container in the pod. + /// + /// + /// Follow the log stream of the pod. Defaults to false. + /// + /// + /// If set, the number of bytes to read from the server before + /// terminating the log output. This may not display a complete final + /// line of logging, and may return slightly more or slightly less than + /// the specified limit. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Return previous terminated container logs. Defaults to false. + /// + /// + /// A relative time in seconds before the current time from which to + /// show logs. If this value precedes the time a pod was started, only + /// logs since the pod start will be returned. If this value is in the + /// future, no logs will be returned. Only one of sinceSeconds or + /// sinceTime may be specified. + /// + /// + /// If set, the number of lines from the end of the logs to show. If + /// not specified, logs are shown from the creation of the container or + /// sinceSeconds or sinceTime + /// + /// + /// If true, add an RFC3339 or RFC3339Nano timestamp at the beginning + /// of every line of log output. Defaults to false. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedPodLogWithHttpMessagesAsync(string name, string namespaceParameter, string container = default(string), bool? follow = default(bool?), int? limitBytes = default(int?), string pretty = default(string), bool? previous = default(bool?), int? sinceSeconds = default(int?), int? tailLines = default(int?), bool? timestamps = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect GET requests to portforward of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// List of ports to forward Required when using WebSockets + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectGetNamespacedPodPortforwardWithHttpMessagesAsync(string name, string namespaceParameter, int? ports = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect POST requests to portforward of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// List of ports to forward Required when using WebSockets + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPostNamespacedPodPortforwardWithHttpMessagesAsync(string name, string namespaceParameter, int? ports = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect GET requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectGetNamespacedPodProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect PUT requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPutNamespacedPodProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect POST requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPostNamespacedPodProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect DELETE requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectDeleteNamespacedPodProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect HEAD requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectHeadNamespacedPodProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect GET requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectGetNamespacedPodProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect PUT requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPutNamespacedPodProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect POST requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPostNamespacedPodProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect DELETE requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectDeleteNamespacedPodProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect HEAD requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectHeadNamespacedPodProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedPodStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified Pod + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedPodStatusWithHttpMessagesAsync(V1Pod body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified Pod + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedPodStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedPodTemplateWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a PodTemplate + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedPodTemplateWithHttpMessagesAsync(V1PodTemplate body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedPodTemplateWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified PodTemplate + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedPodTemplateWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified PodTemplate + /// + /// + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedPodTemplateWithHttpMessagesAsync(V1PodTemplate body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a PodTemplate + /// + /// + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedPodTemplateWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified PodTemplate + /// + /// + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedPodTemplateWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedReplicationControllerWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a ReplicationController + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedReplicationControllerWithHttpMessagesAsync(V1ReplicationController body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedReplicationControllerWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified ReplicationController + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedReplicationControllerWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified ReplicationController + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedReplicationControllerWithHttpMessagesAsync(V1ReplicationController body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a ReplicationController + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedReplicationControllerWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified ReplicationController + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedReplicationControllerWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read scale of the specified Scale + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedScaleScaleWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedScaleScaleWithHttpMessagesAsync(V1Scale body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedScaleScaleWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified ReplicationController + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedReplicationControllerStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified ReplicationController + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedReplicationControllerStatusWithHttpMessagesAsync(V1ReplicationController body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified ReplicationController + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedReplicationControllerStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedResourceQuotaWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a ResourceQuota + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedResourceQuotaWithHttpMessagesAsync(V1ResourceQuota body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedResourceQuotaWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified ResourceQuota + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedResourceQuotaWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified ResourceQuota + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedResourceQuotaWithHttpMessagesAsync(V1ResourceQuota body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a ResourceQuota + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedResourceQuotaWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified ResourceQuota + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedResourceQuotaWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified ResourceQuota + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedResourceQuotaStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified ResourceQuota + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedResourceQuotaStatusWithHttpMessagesAsync(V1ResourceQuota body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified ResourceQuota + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedResourceQuotaStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedSecretWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a Secret + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedSecretWithHttpMessagesAsync(V1Secret body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedSecretWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Secret + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedSecretWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Secret + /// + /// + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedSecretWithHttpMessagesAsync(V1Secret body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a Secret + /// + /// + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedSecretWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Secret + /// + /// + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedSecretWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedServiceAccountWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a ServiceAccount + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedServiceAccountWithHttpMessagesAsync(V1ServiceAccount body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedServiceAccountWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified ServiceAccount + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedServiceAccountWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified ServiceAccount + /// + /// + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedServiceAccountWithHttpMessagesAsync(V1ServiceAccount body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a ServiceAccount + /// + /// + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedServiceAccountWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified ServiceAccount + /// + /// + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedServiceAccountWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedServiceWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a Service + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedServiceWithHttpMessagesAsync(V1Service body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Service + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedServiceWithHttpMessagesAsync(V1Service body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Service + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedServiceWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect GET requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, + /// and parameters to use for the current proxy request to service. For + /// example, the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectGetNamespacedServiceProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect PUT requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, + /// and parameters to use for the current proxy request to service. For + /// example, the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPutNamespacedServiceProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect POST requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, + /// and parameters to use for the current proxy request to service. For + /// example, the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPostNamespacedServiceProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect DELETE requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, + /// and parameters to use for the current proxy request to service. For + /// example, the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectDeleteNamespacedServiceProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect HEAD requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, + /// and parameters to use for the current proxy request to service. For + /// example, the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectHeadNamespacedServiceProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect GET requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, + /// and parameters to use for the current proxy request to service. For + /// example, the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectGetNamespacedServiceProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect PUT requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, + /// and parameters to use for the current proxy request to service. For + /// example, the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPutNamespacedServiceProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect POST requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, + /// and parameters to use for the current proxy request to service. For + /// example, the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPostNamespacedServiceProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect DELETE requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, + /// and parameters to use for the current proxy request to service. For + /// example, the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectDeleteNamespacedServiceProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect HEAD requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, + /// and parameters to use for the current proxy request to service. For + /// example, the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectHeadNamespacedServiceProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedServiceStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified Service + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedServiceStatusWithHttpMessagesAsync(V1Service body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified Service + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedServiceStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Namespace + /// + /// + /// name of the Namespace + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespaceWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Namespace + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespaceWithHttpMessagesAsync(V1Namespace body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a Namespace + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespaceWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Namespace + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespaceWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace finalize of the specified Namespace + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespaceFinalizeWithHttpMessagesAsync(V1Namespace body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified Namespace + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespaceStatusWithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified Namespace + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespaceStatusWithHttpMessagesAsync(V1Namespace body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified Namespace + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespaceStatusWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Node + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNodeWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a Node + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNodeWithHttpMessagesAsync(V1Node body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of Node + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNodeWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Node + /// + /// + /// name of the Node + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNodeWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Node + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNodeWithHttpMessagesAsync(V1Node body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a Node + /// + /// + /// + /// + /// name of the Node + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNodeWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Node + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNodeWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect GET requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectGetNodeProxyWithHttpMessagesAsync(string name, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect PUT requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPutNodeProxyWithHttpMessagesAsync(string name, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect POST requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPostNodeProxyWithHttpMessagesAsync(string name, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect DELETE requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectDeleteNodeProxyWithHttpMessagesAsync(string name, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect HEAD requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectHeadNodeProxyWithHttpMessagesAsync(string name, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect GET requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectGetNodeProxyWithPathWithHttpMessagesAsync(string name, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect PUT requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPutNodeProxyWithPathWithHttpMessagesAsync(string name, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect POST requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectPostNodeProxyWithPathWithHttpMessagesAsync(string name, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect DELETE requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectDeleteNodeProxyWithPathWithHttpMessagesAsync(string name, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// connect HEAD requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ConnectHeadNodeProxyWithPathWithHttpMessagesAsync(string name, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified Node + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNodeStatusWithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified Node + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNodeStatusWithHttpMessagesAsync(V1Node body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified Node + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNodeStatusWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind PersistentVolumeClaim + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListPersistentVolumeClaimForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind PersistentVolume + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListPersistentVolumeWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a PersistentVolume + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreatePersistentVolumeWithHttpMessagesAsync(V1PersistentVolume body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of PersistentVolume + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionPersistentVolumeWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified PersistentVolume + /// + /// + /// name of the PersistentVolume + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadPersistentVolumeWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified PersistentVolume + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplacePersistentVolumeWithHttpMessagesAsync(V1PersistentVolume body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a PersistentVolume + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeletePersistentVolumeWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified PersistentVolume + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchPersistentVolumeWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified PersistentVolume + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadPersistentVolumeStatusWithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified PersistentVolume + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplacePersistentVolumeStatusWithHttpMessagesAsync(V1PersistentVolume body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified PersistentVolume + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchPersistentVolumeStatusWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Pod + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListPodForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind PodTemplate + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListPodTemplateForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy GET requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyGETNamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy PUT requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPUTNamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy POST requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPOSTNamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy DELETE requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyDELETENamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy HEAD requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyHEADNamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy PATCH requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPATCHNamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy GET requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyGETNamespacedPodWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy PUT requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPUTNamespacedPodWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy POST requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPOSTNamespacedPodWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy DELETE requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyDELETENamespacedPodWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy HEAD requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyHEADNamespacedPodWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy PATCH requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPATCHNamespacedPodWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy GET requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyGETNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy PUT requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPUTNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy POST requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPOSTNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy DELETE requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyDELETENamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy HEAD requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyHEADNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy PATCH requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPATCHNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy GET requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyGETNamespacedServiceWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy PUT requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPUTNamespacedServiceWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy POST requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPOSTNamespacedServiceWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy DELETE requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyDELETENamespacedServiceWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy HEAD requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyHEADNamespacedServiceWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy PATCH requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPATCHNamespacedServiceWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy GET requests to Node + /// + /// + /// name of the Node + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyGETNodeWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy PUT requests to Node + /// + /// + /// name of the Node + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPUTNodeWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy POST requests to Node + /// + /// + /// name of the Node + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPOSTNodeWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy DELETE requests to Node + /// + /// + /// name of the Node + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyDELETENodeWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy HEAD requests to Node + /// + /// + /// name of the Node + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyHEADNodeWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy PATCH requests to Node + /// + /// + /// name of the Node + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPATCHNodeWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy GET requests to Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyGETNodeWithPathWithHttpMessagesAsync(string name, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy PUT requests to Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPUTNodeWithPathWithHttpMessagesAsync(string name, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy POST requests to Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPOSTNodeWithPathWithHttpMessagesAsync(string name, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy DELETE requests to Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyDELETENodeWithPathWithHttpMessagesAsync(string name, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy HEAD requests to Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyHEADNodeWithPathWithHttpMessagesAsync(string name, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// proxy PATCH requests to Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ProxyPATCHNodeWithPathWithHttpMessagesAsync(string name, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ReplicationController + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListReplicationControllerForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ResourceQuota + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListResourceQuotaForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Secret + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListSecretForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ServiceAccount + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListServiceAccountForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Service + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListServiceForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available API versions + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIVersions1WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get information of a group + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIGroupWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources1WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Deployment + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListDeploymentForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedDeploymentWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a Deployment + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedDeploymentWithHttpMessagesAsync(Appsv1beta1Deployment body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedDeploymentWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Deployment + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedDeploymentWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedDeploymentWithHttpMessagesAsync(Appsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedDeploymentWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedDeploymentWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create rollback of a DeploymentRollback + /// + /// + /// + /// + /// name of the DeploymentRollback + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedDeploymentRollbackRollbackWithHttpMessagesAsync(Appsv1beta1DeploymentRollback body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read scale of the specified Scale + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedScaleScale1WithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedScaleScale1WithHttpMessagesAsync(Appsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedScaleScale1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified Deployment + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedDeploymentStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedDeploymentStatusWithHttpMessagesAsync(Appsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedDeploymentStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedStatefulSetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a StatefulSet + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedStatefulSetWithHttpMessagesAsync(V1beta1StatefulSet body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedStatefulSetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified StatefulSet + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedStatefulSetWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified StatefulSet + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedStatefulSetWithHttpMessagesAsync(V1beta1StatefulSet body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a StatefulSet + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedStatefulSetWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified StatefulSet + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedStatefulSetWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified StatefulSet + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedStatefulSetStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified StatefulSet + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedStatefulSetStatusWithHttpMessagesAsync(V1beta1StatefulSet body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified StatefulSet + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedStatefulSetStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind StatefulSet + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListStatefulSetForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get information of a group + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIGroup1WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources2WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a TokenReview + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateTokenReviewWithHttpMessagesAsync(V1TokenReview body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources3WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a TokenReview + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateTokenReview1WithHttpMessagesAsync(V1beta1TokenReview body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get information of a group + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIGroup2WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources4WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a LocalSubjectAccessReview + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedLocalSubjectAccessReviewWithHttpMessagesAsync(V1LocalSubjectAccessReview body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a SelfSubjectAccessReview + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateSelfSubjectAccessReviewWithHttpMessagesAsync(V1SelfSubjectAccessReview body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a SubjectAccessReview + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateSubjectAccessReviewWithHttpMessagesAsync(V1SubjectAccessReview body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources5WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a LocalSubjectAccessReview + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedLocalSubjectAccessReview1WithHttpMessagesAsync(V1beta1LocalSubjectAccessReview body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a SelfSubjectAccessReview + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateSelfSubjectAccessReview1WithHttpMessagesAsync(V1beta1SelfSubjectAccessReview body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a SubjectAccessReview + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateSubjectAccessReview1WithHttpMessagesAsync(V1beta1SubjectAccessReview body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get information of a group + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIGroup3WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources6WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListHorizontalPodAutoscalerForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a HorizontalPodAutoscaler + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(V1HorizontalPodAutoscaler body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified HorizontalPodAutoscaler + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(V1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified HorizontalPodAutoscaler + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedHorizontalPodAutoscalerStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedHorizontalPodAutoscalerStatusWithHttpMessagesAsync(V1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedHorizontalPodAutoscalerStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources7WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListHorizontalPodAutoscalerForAllNamespaces1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a HorizontalPodAutoscaler + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(V2alpha1HorizontalPodAutoscaler body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified HorizontalPodAutoscaler + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(V2alpha1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified HorizontalPodAutoscaler + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedHorizontalPodAutoscalerStatus1WithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedHorizontalPodAutoscalerStatus1WithHttpMessagesAsync(V2alpha1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedHorizontalPodAutoscalerStatus1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get information of a group + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIGroup4WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources8WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Job + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListJobForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedJobWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a Job + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedJobWithHttpMessagesAsync(V1Job body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedJobWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Job + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedJobWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Job + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedJobWithHttpMessagesAsync(V1Job body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a Job + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedJobWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Job + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedJobWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified Job + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedJobStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified Job + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedJobStatusWithHttpMessagesAsync(V1Job body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified Job + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedJobStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources9WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind CronJob + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListCronJobForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedCronJobWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a CronJob + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedCronJobWithHttpMessagesAsync(V2alpha1CronJob body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedCronJobWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified CronJob + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedCronJobWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified CronJob + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedCronJobWithHttpMessagesAsync(V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a CronJob + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedCronJobWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified CronJob + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedCronJobWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified CronJob + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedCronJobStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified CronJob + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedCronJobStatusWithHttpMessagesAsync(V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified CronJob + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedCronJobStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedScheduledJobWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a ScheduledJob + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedScheduledJobWithHttpMessagesAsync(V2alpha1CronJob body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedScheduledJobWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified ScheduledJob + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedScheduledJobWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified ScheduledJob + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedScheduledJobWithHttpMessagesAsync(V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a ScheduledJob + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedScheduledJobWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified ScheduledJob + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedScheduledJobWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified ScheduledJob + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedScheduledJobStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified ScheduledJob + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedScheduledJobStatusWithHttpMessagesAsync(V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified ScheduledJob + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedScheduledJobStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ScheduledJob + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListScheduledJobForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get information of a group + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIGroup5WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources10WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind CertificateSigningRequest + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListCertificateSigningRequestWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a CertificateSigningRequest + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateCertificateSigningRequestWithHttpMessagesAsync(V1beta1CertificateSigningRequest body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of CertificateSigningRequest + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionCertificateSigningRequestWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified CertificateSigningRequest + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadCertificateSigningRequestWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified CertificateSigningRequest + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceCertificateSigningRequestWithHttpMessagesAsync(V1beta1CertificateSigningRequest body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a CertificateSigningRequest + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCertificateSigningRequestWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified CertificateSigningRequest + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchCertificateSigningRequestWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace approval of the specified CertificateSigningRequest + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceCertificateSigningRequestApprovalWithHttpMessagesAsync(V1beta1CertificateSigningRequest body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified CertificateSigningRequest + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceCertificateSigningRequestStatusWithHttpMessagesAsync(V1beta1CertificateSigningRequest body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get information of a group + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIGroup6WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources11WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind DaemonSet + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListDaemonSetForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Deployment + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListDeploymentForAllNamespaces1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Ingress + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListIngressForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedDaemonSetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a DaemonSet + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedDaemonSetWithHttpMessagesAsync(V1beta1DaemonSet body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedDaemonSetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified DaemonSet + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedDaemonSetWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified DaemonSet + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedDaemonSetWithHttpMessagesAsync(V1beta1DaemonSet body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a DaemonSet + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedDaemonSetWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified DaemonSet + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedDaemonSetWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified DaemonSet + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedDaemonSetStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified DaemonSet + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedDaemonSetStatusWithHttpMessagesAsync(V1beta1DaemonSet body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified DaemonSet + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedDaemonSetStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedDeployment1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a Deployment + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedDeployment1WithHttpMessagesAsync(Extensionsv1beta1Deployment body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedDeployment1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Deployment + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedDeployment1WithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedDeployment1WithHttpMessagesAsync(Extensionsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedDeployment1WithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedDeployment1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create rollback of a DeploymentRollback + /// + /// + /// + /// + /// name of the DeploymentRollback + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedDeploymentRollbackRollback1WithHttpMessagesAsync(Extensionsv1beta1DeploymentRollback body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read scale of the specified Scale + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedDeploymentsScaleWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedDeploymentsScaleWithHttpMessagesAsync(Extensionsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedDeploymentsScaleWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified Deployment + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedDeploymentStatus1WithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedDeploymentStatus1WithHttpMessagesAsync(Extensionsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedDeploymentStatus1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedIngressWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create an Ingress + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedIngressWithHttpMessagesAsync(V1beta1Ingress body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedIngressWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Ingress + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedIngressWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Ingress + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedIngressWithHttpMessagesAsync(V1beta1Ingress body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete an Ingress + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedIngressWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Ingress + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedIngressWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified Ingress + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedIngressStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified Ingress + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedIngressStatusWithHttpMessagesAsync(V1beta1Ingress body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified Ingress + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedIngressStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedNetworkPolicyWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a NetworkPolicy + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedNetworkPolicyWithHttpMessagesAsync(V1beta1NetworkPolicy body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedNetworkPolicyWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified NetworkPolicy + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedNetworkPolicyWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified NetworkPolicy + /// + /// + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedNetworkPolicyWithHttpMessagesAsync(V1beta1NetworkPolicy body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a NetworkPolicy + /// + /// + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedNetworkPolicyWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified NetworkPolicy + /// + /// + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedNetworkPolicyWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedReplicaSetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a ReplicaSet + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedReplicaSetWithHttpMessagesAsync(V1beta1ReplicaSet body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedReplicaSetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified ReplicaSet + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedReplicaSetWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified ReplicaSet + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedReplicaSetWithHttpMessagesAsync(V1beta1ReplicaSet body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a ReplicaSet + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedReplicaSetWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified ReplicaSet + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedReplicaSetWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read scale of the specified Scale + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedReplicasetsScaleWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedReplicasetsScaleWithHttpMessagesAsync(Extensionsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedReplicasetsScaleWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified ReplicaSet + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedReplicaSetStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified ReplicaSet + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedReplicaSetStatusWithHttpMessagesAsync(V1beta1ReplicaSet body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified ReplicaSet + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedReplicaSetStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read scale of the specified Scale + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedReplicationcontrollersScaleWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedReplicationcontrollersScaleWithHttpMessagesAsync(Extensionsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedReplicationcontrollersScaleWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind NetworkPolicy + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNetworkPolicyForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind PodSecurityPolicy + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListPodSecurityPolicyWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a PodSecurityPolicy + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreatePodSecurityPolicyWithHttpMessagesAsync(V1beta1PodSecurityPolicy body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of PodSecurityPolicy + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionPodSecurityPolicyWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified PodSecurityPolicy + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadPodSecurityPolicyWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified PodSecurityPolicy + /// + /// + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplacePodSecurityPolicyWithHttpMessagesAsync(V1beta1PodSecurityPolicy body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a PodSecurityPolicy + /// + /// + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeletePodSecurityPolicyWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified PodSecurityPolicy + /// + /// + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchPodSecurityPolicyWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ReplicaSet + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListReplicaSetForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ThirdPartyResource + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListThirdPartyResourceWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a ThirdPartyResource + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateThirdPartyResourceWithHttpMessagesAsync(V1beta1ThirdPartyResource body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of ThirdPartyResource + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionThirdPartyResourceWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified ThirdPartyResource + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadThirdPartyResourceWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified ThirdPartyResource + /// + /// + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceThirdPartyResourceWithHttpMessagesAsync(V1beta1ThirdPartyResource body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a ThirdPartyResource + /// + /// + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteThirdPartyResourceWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified ThirdPartyResource + /// + /// + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchThirdPartyResourceWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get information of a group + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIGroup7WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources12WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedPodDisruptionBudgetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a PodDisruptionBudget + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedPodDisruptionBudgetWithHttpMessagesAsync(V1beta1PodDisruptionBudget body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedPodDisruptionBudgetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified PodDisruptionBudget + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedPodDisruptionBudgetWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified PodDisruptionBudget + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedPodDisruptionBudgetWithHttpMessagesAsync(V1beta1PodDisruptionBudget body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a PodDisruptionBudget + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedPodDisruptionBudgetWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified PodDisruptionBudget + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedPodDisruptionBudgetWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read status of the specified PodDisruptionBudget + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedPodDisruptionBudgetStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace status of the specified PodDisruptionBudget + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedPodDisruptionBudgetStatusWithHttpMessagesAsync(V1beta1PodDisruptionBudget body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update status of the specified PodDisruptionBudget + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedPodDisruptionBudgetStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind PodDisruptionBudget + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListPodDisruptionBudgetForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get information of a group + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIGroup8WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources13WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ClusterRoleBinding + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListClusterRoleBindingWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a ClusterRoleBinding + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateClusterRoleBindingWithHttpMessagesAsync(V1alpha1ClusterRoleBinding body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of ClusterRoleBinding + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionClusterRoleBindingWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified ClusterRoleBinding + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadClusterRoleBindingWithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified ClusterRoleBinding + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceClusterRoleBindingWithHttpMessagesAsync(V1alpha1ClusterRoleBinding body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a ClusterRoleBinding + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteClusterRoleBindingWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified ClusterRoleBinding + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchClusterRoleBindingWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ClusterRole + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListClusterRoleWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a ClusterRole + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateClusterRoleWithHttpMessagesAsync(V1alpha1ClusterRole body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of ClusterRole + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionClusterRoleWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified ClusterRole + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadClusterRoleWithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified ClusterRole + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceClusterRoleWithHttpMessagesAsync(V1alpha1ClusterRole body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a ClusterRole + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteClusterRoleWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified ClusterRole + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchClusterRoleWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedRoleBindingWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a RoleBinding + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedRoleBindingWithHttpMessagesAsync(V1alpha1RoleBinding body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedRoleBindingWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified RoleBinding + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedRoleBindingWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified RoleBinding + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedRoleBindingWithHttpMessagesAsync(V1alpha1RoleBinding body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a RoleBinding + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedRoleBindingWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified RoleBinding + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedRoleBindingWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedRoleWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a Role + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedRoleWithHttpMessagesAsync(V1alpha1Role body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedRoleWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Role + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedRoleWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Role + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedRoleWithHttpMessagesAsync(V1alpha1Role body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a Role + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedRoleWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Role + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedRoleWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListRoleBindingForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Role + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListRoleForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources14WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ClusterRoleBinding + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListClusterRoleBinding1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a ClusterRoleBinding + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateClusterRoleBinding1WithHttpMessagesAsync(V1beta1ClusterRoleBinding body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of ClusterRoleBinding + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionClusterRoleBinding1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified ClusterRoleBinding + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadClusterRoleBinding1WithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified ClusterRoleBinding + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceClusterRoleBinding1WithHttpMessagesAsync(V1beta1ClusterRoleBinding body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a ClusterRoleBinding + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteClusterRoleBinding1WithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified ClusterRoleBinding + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchClusterRoleBinding1WithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind ClusterRole + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListClusterRole1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a ClusterRole + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateClusterRole1WithHttpMessagesAsync(V1beta1ClusterRole body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of ClusterRole + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionClusterRole1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified ClusterRole + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadClusterRole1WithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified ClusterRole + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceClusterRole1WithHttpMessagesAsync(V1beta1ClusterRole body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a ClusterRole + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteClusterRole1WithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified ClusterRole + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchClusterRole1WithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedRoleBinding1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a RoleBinding + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedRoleBinding1WithHttpMessagesAsync(V1beta1RoleBinding body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedRoleBinding1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified RoleBinding + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedRoleBinding1WithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified RoleBinding + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedRoleBinding1WithHttpMessagesAsync(V1beta1RoleBinding body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a RoleBinding + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedRoleBinding1WithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified RoleBinding + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedRoleBinding1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedRole1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a Role + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedRole1WithHttpMessagesAsync(V1beta1Role body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedRole1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified Role + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedRole1WithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified Role + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedRole1WithHttpMessagesAsync(V1beta1Role body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a Role + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedRole1WithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified Role + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedRole1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListRoleBindingForAllNamespaces1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind Role + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListRoleForAllNamespaces1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get information of a group + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIGroup9WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources15WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListNamespacedPodPresetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a PodPreset + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateNamespacedPodPresetWithHttpMessagesAsync(V1alpha1PodPreset body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionNamespacedPodPresetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified PodPreset + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadNamespacedPodPresetWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified PodPreset + /// + /// + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceNamespacedPodPresetWithHttpMessagesAsync(V1alpha1PodPreset body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a PodPreset + /// + /// + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteNamespacedPodPresetWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified PodPreset + /// + /// + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchNamespacedPodPresetWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind PodPreset + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListPodPresetForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get information of a group + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIGroup10WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources16WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind StorageClass + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListStorageClassWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a StorageClass + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateStorageClassWithHttpMessagesAsync(V1StorageClass body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of StorageClass + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionStorageClassWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified StorageClass + /// + /// + /// name of the StorageClass + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadStorageClassWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified StorageClass + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceStorageClassWithHttpMessagesAsync(V1StorageClass body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a StorageClass + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteStorageClassWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified StorageClass + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchStorageClassWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get available resources + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAPIResources17WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// list or watch objects of kind StorageClass + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ListStorageClass1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// create a StorageClass + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> CreateStorageClass1WithHttpMessagesAsync(V1beta1StorageClass body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete collection of StorageClass + /// + /// + /// A selector to restrict the list of returned objects by their + /// fields. Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their + /// labels. Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after + /// that particular version of a resource. Defaults to changes from the + /// beginning of history. When specified for list: - if unset, then the + /// result is returned from remote storage based on quorum-read flag; - + /// if it's 0, then we simply return what we currently have in cache, + /// no guarantee; - if set to non zero, then the result is at least as + /// fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a + /// stream of add, update, and remove notifications. Specify + /// resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteCollectionStorageClass1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// read the specified StorageClass + /// + /// + /// name of the StorageClass + /// + /// + /// Should the export be exact. Exact export maintains + /// cluster-specific fields like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user + /// can not specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReadStorageClass1WithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// replace the specified StorageClass + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> ReplaceStorageClass1WithHttpMessagesAsync(V1beta1StorageClass body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// delete a StorageClass + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// The duration in seconds before the object should be deleted. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period for the + /// specified type will be used. Defaults to a per object value if not + /// specified. zero means delete immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be + /// deprecated in 1.7. Should the dependent objects be orphaned. If + /// true/false, the "orphan" finalizer will be added to/removed from + /// the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this + /// field or OrphanDependents may be set, but not both. The default + /// policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteStorageClass1WithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// partially update the specified StorageClass + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> PatchStorageClass1WithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task LogFileListHandlerWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// path to the log + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task LogFileHandlerWithHttpMessagesAsync(string logpath, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// get the code version + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetCodeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + } +} diff --git a/src/generated/Kubernetes.cs b/src/generated/Kubernetes.cs new file mode 100755 index 000000000..693dfd930 --- /dev/null +++ b/src/generated/Kubernetes.cs @@ -0,0 +1,88817 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public partial class Kubernetes : ServiceClient, IKubernetes + { + /// + /// The base URI of the service. + /// + public System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + public JsonSerializerSettings SerializationSettings { get; private set; } + + /// + /// Gets or sets json deserialization settings. + /// + public JsonSerializerSettings DeserializationSettings { get; private set; } + + /// + /// Initializes a new instance of the Kubernetes class. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + public Kubernetes(params DelegatingHandler[] handlers) : base(handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the Kubernetes class. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + public Kubernetes(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the Kubernetes class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public Kubernetes(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the Kubernetes class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public Kubernetes(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// An optional partial-method to perform custom initialization. + /// + partial void CustomInitialize(); + /// + /// Initializes client properties. + /// + private void Initialize() + { + BaseUri = new System.Uri("http://localhost"); + SerializationSettings = new JsonSerializerSettings + { + Formatting = Newtonsoft.Json.Formatting.Indented, + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + DeserializationSettings = new JsonSerializerSettings + { + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + CustomInitialize(); + } + /// + /// get available API versions + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIVersionsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIVersions", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResourcesWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list objects of kind ComponentStatus + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListComponentStatusWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListComponentStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/componentstatuses").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified ComponentStatus + /// + /// + /// name of the ComponentStatus + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadComponentStatusWithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadComponentStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/componentstatuses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ConfigMap + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListConfigMapForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListConfigMapForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/configmaps").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Endpoints + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListEndpointsForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListEndpointsForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/endpoints").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Event + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListEventForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListEventForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/events").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind LimitRange + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListLimitRangeForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListLimitRangeForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/limitranges").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Namespace + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespaceWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespace", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a Namespace + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespaceWithHttpMessagesAsync(V1Namespace body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespace", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of Namespace + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespaceWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespace", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a Binding + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedBindingWithHttpMessagesAsync(V1Binding body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/bindings").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedConfigMapWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedConfigMap", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/configmaps").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a ConfigMap + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedConfigMapWithHttpMessagesAsync(V1ConfigMap body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedConfigMap", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/configmaps").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedConfigMapWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedConfigMap", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/configmaps").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified ConfigMap + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedConfigMapWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedConfigMap", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/configmaps/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified ConfigMap + /// + /// + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedConfigMapWithHttpMessagesAsync(V1ConfigMap body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedConfigMap", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/configmaps/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a ConfigMap + /// + /// + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedConfigMapWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedConfigMap", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/configmaps/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified ConfigMap + /// + /// + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedConfigMapWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedConfigMap", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/configmaps/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedEndpointsWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedEndpoints", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/endpoints").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create Endpoints + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedEndpointsWithHttpMessagesAsync(V1Endpoints body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedEndpoints", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/endpoints").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedEndpointsWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedEndpoints", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/endpoints").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Endpoints + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedEndpointsWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedEndpoints", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/endpoints/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Endpoints + /// + /// + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedEndpointsWithHttpMessagesAsync(V1Endpoints body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedEndpoints", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/endpoints/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete Endpoints + /// + /// + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedEndpointsWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedEndpoints", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/endpoints/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Endpoints + /// + /// + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedEndpointsWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedEndpoints", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/endpoints/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedEventWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedEvent", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/events").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create an Event + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedEventWithHttpMessagesAsync(V1Event body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedEvent", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/events").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedEventWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedEvent", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/events").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Event + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedEventWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedEvent", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/events/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Event + /// + /// + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedEventWithHttpMessagesAsync(V1Event body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedEvent", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/events/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete an Event + /// + /// + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedEventWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedEvent", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/events/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Event + /// + /// + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedEventWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedEvent", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/events/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedLimitRangeWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedLimitRange", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/limitranges").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a LimitRange + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedLimitRangeWithHttpMessagesAsync(V1LimitRange body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedLimitRange", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/limitranges").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedLimitRangeWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedLimitRange", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/limitranges").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified LimitRange + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedLimitRangeWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedLimitRange", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/limitranges/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified LimitRange + /// + /// + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedLimitRangeWithHttpMessagesAsync(V1LimitRange body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedLimitRange", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/limitranges/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a LimitRange + /// + /// + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedLimitRangeWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedLimitRange", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/limitranges/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified LimitRange + /// + /// + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedLimitRangeWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedLimitRange", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/limitranges/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedPersistentVolumeClaimWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedPersistentVolumeClaim", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/persistentvolumeclaims").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a PersistentVolumeClaim + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedPersistentVolumeClaimWithHttpMessagesAsync(V1PersistentVolumeClaim body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedPersistentVolumeClaim", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/persistentvolumeclaims").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedPersistentVolumeClaimWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedPersistentVolumeClaim", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/persistentvolumeclaims").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified PersistentVolumeClaim + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedPersistentVolumeClaimWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedPersistentVolumeClaim", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified PersistentVolumeClaim + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedPersistentVolumeClaimWithHttpMessagesAsync(V1PersistentVolumeClaim body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedPersistentVolumeClaim", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a PersistentVolumeClaim + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedPersistentVolumeClaimWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedPersistentVolumeClaim", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified PersistentVolumeClaim + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedPersistentVolumeClaimWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedPersistentVolumeClaim", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified PersistentVolumeClaim + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedPersistentVolumeClaimStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedPersistentVolumeClaimStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified PersistentVolumeClaim + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedPersistentVolumeClaimStatusWithHttpMessagesAsync(V1PersistentVolumeClaim body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedPersistentVolumeClaimStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified PersistentVolumeClaim + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedPersistentVolumeClaimStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedPersistentVolumeClaimStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedPodWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a Pod + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedPodWithHttpMessagesAsync(V1Pod body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedPodWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Pod + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedPodWithHttpMessagesAsync(V1Pod body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a Pod + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedPodWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Pod + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedPodWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect GET requests to attach of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The container in which to execute the command. Defaults to only container + /// if there is only one container in the pod. + /// + /// + /// Stderr if true indicates that stderr is to be redirected for the attach + /// call. Defaults to true. + /// + /// + /// Stdin if true, redirects the standard input stream of the pod for this + /// call. Defaults to false. + /// + /// + /// Stdout if true indicates that stdout is to be redirected for the attach + /// call. Defaults to true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the attach call. + /// This is passed through the container runtime so the tty is allocated on the + /// worker node by the container runtime. Defaults to false. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectGetNamespacedPodAttachWithHttpMessagesAsync(string name, string namespaceParameter, string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("container", container); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("stderr", stderr); + tracingParameters.Add("stdin", stdin); + tracingParameters.Add("stdout", stdout); + tracingParameters.Add("tty", tty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectGetNamespacedPodAttach", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/attach").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (container != null) + { + _queryParameters.Add(string.Format("container={0}", System.Uri.EscapeDataString(container))); + } + if (stderr != null) + { + _queryParameters.Add(string.Format("stderr={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(stderr, SerializationSettings).Trim('"')))); + } + if (stdin != null) + { + _queryParameters.Add(string.Format("stdin={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(stdin, SerializationSettings).Trim('"')))); + } + if (stdout != null) + { + _queryParameters.Add(string.Format("stdout={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(stdout, SerializationSettings).Trim('"')))); + } + if (tty != null) + { + _queryParameters.Add(string.Format("tty={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(tty, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect POST requests to attach of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The container in which to execute the command. Defaults to only container + /// if there is only one container in the pod. + /// + /// + /// Stderr if true indicates that stderr is to be redirected for the attach + /// call. Defaults to true. + /// + /// + /// Stdin if true, redirects the standard input stream of the pod for this + /// call. Defaults to false. + /// + /// + /// Stdout if true indicates that stdout is to be redirected for the attach + /// call. Defaults to true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the attach call. + /// This is passed through the container runtime so the tty is allocated on the + /// worker node by the container runtime. Defaults to false. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPostNamespacedPodAttachWithHttpMessagesAsync(string name, string namespaceParameter, string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("container", container); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("stderr", stderr); + tracingParameters.Add("stdin", stdin); + tracingParameters.Add("stdout", stdout); + tracingParameters.Add("tty", tty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPostNamespacedPodAttach", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/attach").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (container != null) + { + _queryParameters.Add(string.Format("container={0}", System.Uri.EscapeDataString(container))); + } + if (stderr != null) + { + _queryParameters.Add(string.Format("stderr={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(stderr, SerializationSettings).Trim('"')))); + } + if (stdin != null) + { + _queryParameters.Add(string.Format("stdin={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(stdin, SerializationSettings).Trim('"')))); + } + if (stdout != null) + { + _queryParameters.Add(string.Format("stdout={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(stdout, SerializationSettings).Trim('"')))); + } + if (tty != null) + { + _queryParameters.Add(string.Format("tty={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(tty, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create binding of a Binding + /// + /// + /// + /// + /// name of the Binding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedBindingBindingWithHttpMessagesAsync(V1Binding body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedBindingBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/binding").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create eviction of an Eviction + /// + /// + /// + /// + /// name of the Eviction + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedEvictionEvictionWithHttpMessagesAsync(V1beta1Eviction body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedEvictionEviction", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/eviction").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect GET requests to exec of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Command is the remote command to execute. argv array. Not executed within a + /// shell. + /// + /// + /// Container in which to execute the command. Defaults to only container if + /// there is only one container in the pod. + /// + /// + /// Redirect the standard error stream of the pod for this call. Defaults to + /// true. + /// + /// + /// Redirect the standard input stream of the pod for this call. Defaults to + /// false. + /// + /// + /// Redirect the standard output stream of the pod for this call. Defaults to + /// true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the exec call. + /// Defaults to false. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectGetNamespacedPodExecWithHttpMessagesAsync(string name, string namespaceParameter, string command = default(string), string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("command", command); + tracingParameters.Add("container", container); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("stderr", stderr); + tracingParameters.Add("stdin", stdin); + tracingParameters.Add("stdout", stdout); + tracingParameters.Add("tty", tty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectGetNamespacedPodExec", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/exec").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (command != null) + { + _queryParameters.Add(string.Format("command={0}", System.Uri.EscapeDataString(command))); + } + if (container != null) + { + _queryParameters.Add(string.Format("container={0}", System.Uri.EscapeDataString(container))); + } + if (stderr != null) + { + _queryParameters.Add(string.Format("stderr={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(stderr, SerializationSettings).Trim('"')))); + } + if (stdin != null) + { + _queryParameters.Add(string.Format("stdin={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(stdin, SerializationSettings).Trim('"')))); + } + if (stdout != null) + { + _queryParameters.Add(string.Format("stdout={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(stdout, SerializationSettings).Trim('"')))); + } + if (tty != null) + { + _queryParameters.Add(string.Format("tty={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(tty, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect POST requests to exec of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Command is the remote command to execute. argv array. Not executed within a + /// shell. + /// + /// + /// Container in which to execute the command. Defaults to only container if + /// there is only one container in the pod. + /// + /// + /// Redirect the standard error stream of the pod for this call. Defaults to + /// true. + /// + /// + /// Redirect the standard input stream of the pod for this call. Defaults to + /// false. + /// + /// + /// Redirect the standard output stream of the pod for this call. Defaults to + /// true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the exec call. + /// Defaults to false. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPostNamespacedPodExecWithHttpMessagesAsync(string name, string namespaceParameter, string command = default(string), string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("command", command); + tracingParameters.Add("container", container); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("stderr", stderr); + tracingParameters.Add("stdin", stdin); + tracingParameters.Add("stdout", stdout); + tracingParameters.Add("tty", tty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPostNamespacedPodExec", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/exec").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (command != null) + { + _queryParameters.Add(string.Format("command={0}", System.Uri.EscapeDataString(command))); + } + if (container != null) + { + _queryParameters.Add(string.Format("container={0}", System.Uri.EscapeDataString(container))); + } + if (stderr != null) + { + _queryParameters.Add(string.Format("stderr={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(stderr, SerializationSettings).Trim('"')))); + } + if (stdin != null) + { + _queryParameters.Add(string.Format("stdin={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(stdin, SerializationSettings).Trim('"')))); + } + if (stdout != null) + { + _queryParameters.Add(string.Format("stdout={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(stdout, SerializationSettings).Trim('"')))); + } + if (tty != null) + { + _queryParameters.Add(string.Format("tty={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(tty, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read log of the specified Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The container for which to stream logs. Defaults to only container if there + /// is one container in the pod. + /// + /// + /// Follow the log stream of the pod. Defaults to false. + /// + /// + /// If set, the number of bytes to read from the server before terminating the + /// log output. This may not display a complete final line of logging, and may + /// return slightly more or slightly less than the specified limit. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Return previous terminated container logs. Defaults to false. + /// + /// + /// A relative time in seconds before the current time from which to show logs. + /// If this value precedes the time a pod was started, only logs since the pod + /// start will be returned. If this value is in the future, no logs will be + /// returned. Only one of sinceSeconds or sinceTime may be specified. + /// + /// + /// If set, the number of lines from the end of the logs to show. If not + /// specified, logs are shown from the creation of the container or + /// sinceSeconds or sinceTime + /// + /// + /// If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every + /// line of log output. Defaults to false. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedPodLogWithHttpMessagesAsync(string name, string namespaceParameter, string container = default(string), bool? follow = default(bool?), int? limitBytes = default(int?), string pretty = default(string), bool? previous = default(bool?), int? sinceSeconds = default(int?), int? tailLines = default(int?), bool? timestamps = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("container", container); + tracingParameters.Add("follow", follow); + tracingParameters.Add("limitBytes", limitBytes); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("previous", previous); + tracingParameters.Add("sinceSeconds", sinceSeconds); + tracingParameters.Add("tailLines", tailLines); + tracingParameters.Add("timestamps", timestamps); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedPodLog", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/log").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (container != null) + { + _queryParameters.Add(string.Format("container={0}", System.Uri.EscapeDataString(container))); + } + if (follow != null) + { + _queryParameters.Add(string.Format("follow={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(follow, SerializationSettings).Trim('"')))); + } + if (limitBytes != null) + { + _queryParameters.Add(string.Format("limitBytes={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(limitBytes, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (previous != null) + { + _queryParameters.Add(string.Format("previous={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(previous, SerializationSettings).Trim('"')))); + } + if (sinceSeconds != null) + { + _queryParameters.Add(string.Format("sinceSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(sinceSeconds, SerializationSettings).Trim('"')))); + } + if (tailLines != null) + { + _queryParameters.Add(string.Format("tailLines={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(tailLines, SerializationSettings).Trim('"')))); + } + if (timestamps != null) + { + _queryParameters.Add(string.Format("timestamps={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timestamps, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect GET requests to portforward of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// List of ports to forward Required when using WebSockets + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectGetNamespacedPodPortforwardWithHttpMessagesAsync(string name, string namespaceParameter, int? ports = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("ports", ports); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectGetNamespacedPodPortforward", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/portforward").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (ports != null) + { + _queryParameters.Add(string.Format("ports={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(ports, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect POST requests to portforward of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// List of ports to forward Required when using WebSockets + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPostNamespacedPodPortforwardWithHttpMessagesAsync(string name, string namespaceParameter, int? ports = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("ports", ports); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPostNamespacedPodPortforward", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/portforward").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (ports != null) + { + _queryParameters.Add(string.Format("ports={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(ports, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect GET requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectGetNamespacedPodProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectGetNamespacedPodProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect PUT requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPutNamespacedPodProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPutNamespacedPodProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect POST requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPostNamespacedPodProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPostNamespacedPodProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect DELETE requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectDeleteNamespacedPodProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectDeleteNamespacedPodProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect HEAD requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectHeadNamespacedPodProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectHeadNamespacedPodProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect GET requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectGetNamespacedPodProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectGetNamespacedPodProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect PUT requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPutNamespacedPodProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPutNamespacedPodProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect POST requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPostNamespacedPodProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPostNamespacedPodProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect DELETE requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectDeleteNamespacedPodProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectDeleteNamespacedPodProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect HEAD requests to proxy of Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectHeadNamespacedPodProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectHeadNamespacedPodProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedPodStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedPodStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified Pod + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedPodStatusWithHttpMessagesAsync(V1Pod body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedPodStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified Pod + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedPodStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedPodStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/pods/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedPodTemplateWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedPodTemplate", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/podtemplates").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a PodTemplate + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedPodTemplateWithHttpMessagesAsync(V1PodTemplate body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedPodTemplate", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/podtemplates").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedPodTemplateWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedPodTemplate", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/podtemplates").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified PodTemplate + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedPodTemplateWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedPodTemplate", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/podtemplates/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified PodTemplate + /// + /// + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedPodTemplateWithHttpMessagesAsync(V1PodTemplate body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedPodTemplate", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/podtemplates/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a PodTemplate + /// + /// + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedPodTemplateWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedPodTemplate", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/podtemplates/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified PodTemplate + /// + /// + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedPodTemplateWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedPodTemplate", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/podtemplates/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedReplicationControllerWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedReplicationController", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a ReplicationController + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedReplicationControllerWithHttpMessagesAsync(V1ReplicationController body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedReplicationController", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedReplicationControllerWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedReplicationController", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified ReplicationController + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedReplicationControllerWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedReplicationController", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified ReplicationController + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedReplicationControllerWithHttpMessagesAsync(V1ReplicationController body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedReplicationController", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a ReplicationController + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedReplicationControllerWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedReplicationController", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified ReplicationController + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedReplicationControllerWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedReplicationController", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read scale of the specified Scale + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedScaleScaleWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedScaleScale", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedScaleScaleWithHttpMessagesAsync(V1Scale body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedScaleScale", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedScaleScaleWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedScaleScale", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified ReplicationController + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedReplicationControllerStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedReplicationControllerStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified ReplicationController + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedReplicationControllerStatusWithHttpMessagesAsync(V1ReplicationController body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedReplicationControllerStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified ReplicationController + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedReplicationControllerStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedReplicationControllerStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedResourceQuotaWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedResourceQuota", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/resourcequotas").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a ResourceQuota + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedResourceQuotaWithHttpMessagesAsync(V1ResourceQuota body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedResourceQuota", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/resourcequotas").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedResourceQuotaWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedResourceQuota", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/resourcequotas").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified ResourceQuota + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedResourceQuotaWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedResourceQuota", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/resourcequotas/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified ResourceQuota + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedResourceQuotaWithHttpMessagesAsync(V1ResourceQuota body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedResourceQuota", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/resourcequotas/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a ResourceQuota + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedResourceQuotaWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedResourceQuota", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/resourcequotas/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified ResourceQuota + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedResourceQuotaWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedResourceQuota", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/resourcequotas/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified ResourceQuota + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedResourceQuotaStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedResourceQuotaStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/resourcequotas/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified ResourceQuota + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedResourceQuotaStatusWithHttpMessagesAsync(V1ResourceQuota body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedResourceQuotaStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/resourcequotas/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified ResourceQuota + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedResourceQuotaStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedResourceQuotaStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/resourcequotas/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedSecretWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedSecret", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/secrets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a Secret + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedSecretWithHttpMessagesAsync(V1Secret body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedSecret", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/secrets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedSecretWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedSecret", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/secrets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Secret + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedSecretWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedSecret", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/secrets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Secret + /// + /// + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedSecretWithHttpMessagesAsync(V1Secret body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedSecret", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/secrets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a Secret + /// + /// + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedSecretWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedSecret", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/secrets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Secret + /// + /// + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedSecretWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedSecret", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/secrets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedServiceAccountWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedServiceAccount", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/serviceaccounts").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a ServiceAccount + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedServiceAccountWithHttpMessagesAsync(V1ServiceAccount body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedServiceAccount", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/serviceaccounts").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedServiceAccountWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedServiceAccount", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/serviceaccounts").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified ServiceAccount + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedServiceAccountWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedServiceAccount", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/serviceaccounts/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified ServiceAccount + /// + /// + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedServiceAccountWithHttpMessagesAsync(V1ServiceAccount body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedServiceAccount", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/serviceaccounts/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a ServiceAccount + /// + /// + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedServiceAccountWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedServiceAccount", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/serviceaccounts/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified ServiceAccount + /// + /// + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedServiceAccountWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedServiceAccount", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/serviceaccounts/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedServiceWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedService", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a Service + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedServiceWithHttpMessagesAsync(V1Service body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedService", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedService", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Service + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedServiceWithHttpMessagesAsync(V1Service body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedService", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedService", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Service + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedServiceWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedService", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect GET requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectGetNamespacedServiceProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectGetNamespacedServiceProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect PUT requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPutNamespacedServiceProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPutNamespacedServiceProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect POST requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPostNamespacedServiceProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPostNamespacedServiceProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect DELETE requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectDeleteNamespacedServiceProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectDeleteNamespacedServiceProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect HEAD requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectHeadNamespacedServiceProxyWithHttpMessagesAsync(string name, string namespaceParameter, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectHeadNamespacedServiceProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect GET requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectGetNamespacedServiceProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectGetNamespacedServiceProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect PUT requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPutNamespacedServiceProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPutNamespacedServiceProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect POST requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPostNamespacedServiceProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPostNamespacedServiceProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect DELETE requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectDeleteNamespacedServiceProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectDeleteNamespacedServiceProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect HEAD requests to proxy of Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectHeadNamespacedServiceProxyWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectHeadNamespacedServiceProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedServiceStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedServiceStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified Service + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedServiceStatusWithHttpMessagesAsync(V1Service body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedServiceStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified Service + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedServiceStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedServiceStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{namespace}/services/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Namespace + /// + /// + /// name of the Namespace + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespaceWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespace", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Namespace + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespaceWithHttpMessagesAsync(V1Namespace body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespace", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a Namespace + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespaceWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespace", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Namespace + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespaceWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespace", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace finalize of the specified Namespace + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespaceFinalizeWithHttpMessagesAsync(V1Namespace body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespaceFinalize", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{name}/finalize").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified Namespace + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespaceStatusWithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespaceStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified Namespace + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespaceStatusWithHttpMessagesAsync(V1Namespace body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespaceStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified Namespace + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespaceStatusWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespaceStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/namespaces/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Node + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNodeWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a Node + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNodeWithHttpMessagesAsync(V1Node body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of Node + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNodeWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Node + /// + /// + /// name of the Node + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNodeWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Node + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNodeWithHttpMessagesAsync(V1Node body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a Node + /// + /// + /// + /// + /// name of the Node + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNodeWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Node + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNodeWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect GET requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectGetNodeProxyWithHttpMessagesAsync(string name, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectGetNodeProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect PUT requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPutNodeProxyWithHttpMessagesAsync(string name, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPutNodeProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect POST requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPostNodeProxyWithHttpMessagesAsync(string name, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPostNodeProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect DELETE requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectDeleteNodeProxyWithHttpMessagesAsync(string name, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectDeleteNodeProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect HEAD requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectHeadNodeProxyWithHttpMessagesAsync(string name, string path = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectHeadNodeProxy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/proxy").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (path != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect GET requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectGetNodeProxyWithPathWithHttpMessagesAsync(string name, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectGetNodeProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect PUT requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPutNodeProxyWithPathWithHttpMessagesAsync(string name, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPutNodeProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect POST requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectPostNodeProxyWithPathWithHttpMessagesAsync(string name, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectPostNodeProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect DELETE requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectDeleteNodeProxyWithPathWithHttpMessagesAsync(string name, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectDeleteNodeProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// connect HEAD requests to proxy of Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ConnectHeadNodeProxyWithPathWithHttpMessagesAsync(string name, string path, string path1, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + if (path1 == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path1"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("path1", path1); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ConnectHeadNodeProxyWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/proxy/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + List _queryParameters = new List(); + if (path1 != null) + { + _queryParameters.Add(string.Format("path={0}", System.Uri.EscapeDataString(path1))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified Node + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNodeStatusWithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNodeStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified Node + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNodeStatusWithHttpMessagesAsync(V1Node body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNodeStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified Node + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNodeStatusWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNodeStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/nodes/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind PersistentVolumeClaim + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListPersistentVolumeClaimForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListPersistentVolumeClaimForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/persistentvolumeclaims").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind PersistentVolume + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListPersistentVolumeWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListPersistentVolume", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/persistentvolumes").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a PersistentVolume + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreatePersistentVolumeWithHttpMessagesAsync(V1PersistentVolume body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreatePersistentVolume", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/persistentvolumes").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of PersistentVolume + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionPersistentVolumeWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionPersistentVolume", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/persistentvolumes").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified PersistentVolume + /// + /// + /// name of the PersistentVolume + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadPersistentVolumeWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadPersistentVolume", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/persistentvolumes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified PersistentVolume + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplacePersistentVolumeWithHttpMessagesAsync(V1PersistentVolume body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplacePersistentVolume", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/persistentvolumes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a PersistentVolume + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeletePersistentVolumeWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeletePersistentVolume", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/persistentvolumes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified PersistentVolume + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchPersistentVolumeWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchPersistentVolume", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/persistentvolumes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified PersistentVolume + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadPersistentVolumeStatusWithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadPersistentVolumeStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/persistentvolumes/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified PersistentVolume + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplacePersistentVolumeStatusWithHttpMessagesAsync(V1PersistentVolume body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplacePersistentVolumeStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/persistentvolumes/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified PersistentVolume + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchPersistentVolumeStatusWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchPersistentVolumeStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/persistentvolumes/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Pod + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListPodForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListPodForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/pods").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind PodTemplate + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListPodTemplateForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListPodTemplateForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/podtemplates").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy GET requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyGETNamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyGETNamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/pods/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy PUT requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPUTNamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPUTNamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/pods/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy POST requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPOSTNamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPOSTNamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/pods/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy DELETE requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyDELETENamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyDELETENamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/pods/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy HEAD requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyHEADNamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyHEADNamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/pods/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy PATCH requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPATCHNamespacedPodWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPATCHNamespacedPod", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/pods/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy GET requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyGETNamespacedPodWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyGETNamespacedPodWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy PUT requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPUTNamespacedPodWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPUTNamespacedPodWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy POST requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPOSTNamespacedPodWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPOSTNamespacedPodWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy DELETE requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyDELETENamespacedPodWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyDELETENamespacedPodWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy HEAD requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyHEADNamespacedPodWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyHEADNamespacedPodWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy PATCH requests to Pod + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPATCHNamespacedPodWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPATCHNamespacedPodWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy GET requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyGETNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyGETNamespacedService", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/services/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy PUT requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPUTNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPUTNamespacedService", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/services/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy POST requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPOSTNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPOSTNamespacedService", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/services/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy DELETE requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyDELETENamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyDELETENamespacedService", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/services/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy HEAD requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyHEADNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyHEADNamespacedService", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/services/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy PATCH requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPATCHNamespacedServiceWithHttpMessagesAsync(string name, string namespaceParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPATCHNamespacedService", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/services/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy GET requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyGETNamespacedServiceWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyGETNamespacedServiceWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/services/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy PUT requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPUTNamespacedServiceWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPUTNamespacedServiceWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/services/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy POST requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPOSTNamespacedServiceWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPOSTNamespacedServiceWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/services/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy DELETE requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyDELETENamespacedServiceWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyDELETENamespacedServiceWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/services/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy HEAD requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyHEADNamespacedServiceWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyHEADNamespacedServiceWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/services/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy PATCH requests to Service + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPATCHNamespacedServiceWithPathWithHttpMessagesAsync(string name, string namespaceParameter, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPATCHNamespacedServiceWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/namespaces/{namespace}/services/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy GET requests to Node + /// + /// + /// name of the Node + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyGETNodeWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyGETNode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/nodes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy PUT requests to Node + /// + /// + /// name of the Node + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPUTNodeWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPUTNode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/nodes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy POST requests to Node + /// + /// + /// name of the Node + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPOSTNodeWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPOSTNode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/nodes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy DELETE requests to Node + /// + /// + /// name of the Node + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyDELETENodeWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyDELETENode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/nodes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy HEAD requests to Node + /// + /// + /// name of the Node + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyHEADNodeWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyHEADNode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/nodes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy PATCH requests to Node + /// + /// + /// name of the Node + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPATCHNodeWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPATCHNode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/nodes/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy GET requests to Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyGETNodeWithPathWithHttpMessagesAsync(string name, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyGETNodeWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/nodes/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy PUT requests to Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPUTNodeWithPathWithHttpMessagesAsync(string name, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPUTNodeWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/nodes/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy POST requests to Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPOSTNodeWithPathWithHttpMessagesAsync(string name, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPOSTNodeWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/nodes/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy DELETE requests to Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyDELETENodeWithPathWithHttpMessagesAsync(string name, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyDELETENodeWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/nodes/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy HEAD requests to Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyHEADNodeWithPathWithHttpMessagesAsync(string name, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyHEADNodeWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/nodes/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("HEAD"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// proxy PATCH requests to Node + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ProxyPATCHNodeWithPathWithHttpMessagesAsync(string name, string path, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "path"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("path", path); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ProxyPATCHNodeWithPath", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/proxy/nodes/{name}/{path}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{path}", System.Uri.EscapeDataString(path)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ReplicationController + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListReplicationControllerForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListReplicationControllerForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/replicationcontrollers").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ResourceQuota + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListResourceQuotaForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListResourceQuotaForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/resourcequotas").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Secret + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListSecretForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListSecretForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/secrets").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ServiceAccount + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListServiceAccountForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListServiceAccountForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/serviceaccounts").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Service + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListServiceForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListServiceForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "api/v1/services").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available API versions + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIVersions1WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIVersions1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get information of a group + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIGroupWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIGroup", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources1WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Deployment + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListDeploymentForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/deployments").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedDeploymentWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedDeployment", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a Deployment + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedDeploymentWithHttpMessagesAsync(Appsv1beta1Deployment body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedDeployment", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedDeploymentWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedDeployment", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Deployment + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedDeploymentWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedDeployment", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedDeploymentWithHttpMessagesAsync(Appsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedDeployment", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedDeploymentWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedDeployment", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedDeploymentWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedDeployment", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create rollback of a DeploymentRollback + /// + /// + /// + /// + /// name of the DeploymentRollback + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedDeploymentRollbackRollbackWithHttpMessagesAsync(Appsv1beta1DeploymentRollback body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedDeploymentRollbackRollback", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/rollback").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read scale of the specified Scale + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedScaleScale1WithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedScaleScale1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedScaleScale1WithHttpMessagesAsync(Appsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedScaleScale1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedScaleScale1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedScaleScale1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified Deployment + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedDeploymentStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedDeploymentStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedDeploymentStatusWithHttpMessagesAsync(Appsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedDeploymentStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedDeploymentStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedDeploymentStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedStatefulSetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedStatefulSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/statefulsets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a StatefulSet + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedStatefulSetWithHttpMessagesAsync(V1beta1StatefulSet body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedStatefulSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/statefulsets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedStatefulSetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedStatefulSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/statefulsets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified StatefulSet + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedStatefulSetWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedStatefulSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified StatefulSet + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedStatefulSetWithHttpMessagesAsync(V1beta1StatefulSet body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedStatefulSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a StatefulSet + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedStatefulSetWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedStatefulSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified StatefulSet + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedStatefulSetWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedStatefulSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified StatefulSet + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedStatefulSetStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedStatefulSetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified StatefulSet + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedStatefulSetStatusWithHttpMessagesAsync(V1beta1StatefulSet body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedStatefulSetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified StatefulSet + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedStatefulSetStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedStatefulSetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind StatefulSet + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListStatefulSetForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListStatefulSetForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/apps/v1beta1/statefulsets").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get information of a group + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIGroup1WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIGroup1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authentication.k8s.io/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources2WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources2", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authentication.k8s.io/v1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a TokenReview + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateTokenReviewWithHttpMessagesAsync(V1TokenReview body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateTokenReview", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authentication.k8s.io/v1/tokenreviews").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources3WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources3", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authentication.k8s.io/v1beta1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a TokenReview + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateTokenReview1WithHttpMessagesAsync(V1beta1TokenReview body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateTokenReview1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authentication.k8s.io/v1beta1/tokenreviews").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get information of a group + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIGroup2WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIGroup2", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authorization.k8s.io/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources4WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources4", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authorization.k8s.io/v1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a LocalSubjectAccessReview + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedLocalSubjectAccessReviewWithHttpMessagesAsync(V1LocalSubjectAccessReview body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedLocalSubjectAccessReview", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a SelfSubjectAccessReview + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateSelfSubjectAccessReviewWithHttpMessagesAsync(V1SelfSubjectAccessReview body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateSelfSubjectAccessReview", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authorization.k8s.io/v1/selfsubjectaccessreviews").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a SubjectAccessReview + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateSubjectAccessReviewWithHttpMessagesAsync(V1SubjectAccessReview body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateSubjectAccessReview", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authorization.k8s.io/v1/subjectaccessreviews").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources5WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources5", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authorization.k8s.io/v1beta1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a LocalSubjectAccessReview + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedLocalSubjectAccessReview1WithHttpMessagesAsync(V1beta1LocalSubjectAccessReview body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedLocalSubjectAccessReview1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authorization.k8s.io/v1beta1/namespaces/{namespace}/localsubjectaccessreviews").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a SelfSubjectAccessReview + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateSelfSubjectAccessReview1WithHttpMessagesAsync(V1beta1SelfSubjectAccessReview body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateSelfSubjectAccessReview1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authorization.k8s.io/v1beta1/selfsubjectaccessreviews").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a SubjectAccessReview + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateSubjectAccessReview1WithHttpMessagesAsync(V1beta1SubjectAccessReview body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateSubjectAccessReview1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/authorization.k8s.io/v1beta1/subjectaccessreviews").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get information of a group + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIGroup3WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIGroup3", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources6WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources6", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListHorizontalPodAutoscalerForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListHorizontalPodAutoscalerForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v1/horizontalpodautoscalers").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedHorizontalPodAutoscaler", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a HorizontalPodAutoscaler + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(V1HorizontalPodAutoscaler body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedHorizontalPodAutoscaler", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedHorizontalPodAutoscaler", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified HorizontalPodAutoscaler + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedHorizontalPodAutoscaler", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(V1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedHorizontalPodAutoscaler", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedHorizontalPodAutoscaler", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedHorizontalPodAutoscaler", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified HorizontalPodAutoscaler + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedHorizontalPodAutoscalerStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedHorizontalPodAutoscalerStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedHorizontalPodAutoscalerStatusWithHttpMessagesAsync(V1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedHorizontalPodAutoscalerStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedHorizontalPodAutoscalerStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedHorizontalPodAutoscalerStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources7WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources7", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v2alpha1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListHorizontalPodAutoscalerForAllNamespaces1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListHorizontalPodAutoscalerForAllNamespaces1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v2alpha1/horizontalpodautoscalers").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedHorizontalPodAutoscaler1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a HorizontalPodAutoscaler + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(V2alpha1HorizontalPodAutoscaler body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedHorizontalPodAutoscaler1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedHorizontalPodAutoscaler1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified HorizontalPodAutoscaler + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedHorizontalPodAutoscaler1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(V2alpha1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedHorizontalPodAutoscaler1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedHorizontalPodAutoscaler1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedHorizontalPodAutoscaler1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified HorizontalPodAutoscaler + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedHorizontalPodAutoscalerStatus1WithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedHorizontalPodAutoscalerStatus1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedHorizontalPodAutoscalerStatus1WithHttpMessagesAsync(V2alpha1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedHorizontalPodAutoscalerStatus1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified HorizontalPodAutoscaler + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedHorizontalPodAutoscalerStatus1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedHorizontalPodAutoscalerStatus1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get information of a group + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIGroup4WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIGroup4", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources8WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources8", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Job + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListJobForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListJobForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v1/jobs").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedJobWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v1/namespaces/{namespace}/jobs").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a Job + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedJobWithHttpMessagesAsync(V1Job body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v1/namespaces/{namespace}/jobs").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedJobWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v1/namespaces/{namespace}/jobs").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Job + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedJobWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v1/namespaces/{namespace}/jobs/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Job + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedJobWithHttpMessagesAsync(V1Job body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v1/namespaces/{namespace}/jobs/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a Job + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedJobWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v1/namespaces/{namespace}/jobs/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Job + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedJobWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v1/namespaces/{namespace}/jobs/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified Job + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedJobStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedJobStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v1/namespaces/{namespace}/jobs/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified Job + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedJobStatusWithHttpMessagesAsync(V1Job body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedJobStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v1/namespaces/{namespace}/jobs/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified Job + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedJobStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedJobStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v1/namespaces/{namespace}/jobs/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources9WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources9", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind CronJob + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListCronJobForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListCronJobForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/cronjobs").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedCronJobWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedCronJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/cronjobs").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a CronJob + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedCronJobWithHttpMessagesAsync(V2alpha1CronJob body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedCronJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/cronjobs").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedCronJobWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedCronJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/cronjobs").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified CronJob + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedCronJobWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedCronJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified CronJob + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedCronJobWithHttpMessagesAsync(V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedCronJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a CronJob + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedCronJobWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedCronJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified CronJob + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedCronJobWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedCronJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified CronJob + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedCronJobStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedCronJobStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified CronJob + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedCronJobStatusWithHttpMessagesAsync(V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedCronJobStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified CronJob + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedCronJobStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedCronJobStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedScheduledJobWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedScheduledJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a ScheduledJob + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedScheduledJobWithHttpMessagesAsync(V2alpha1CronJob body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedScheduledJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedScheduledJobWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedScheduledJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified ScheduledJob + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedScheduledJobWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedScheduledJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified ScheduledJob + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedScheduledJobWithHttpMessagesAsync(V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedScheduledJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a ScheduledJob + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedScheduledJobWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedScheduledJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified ScheduledJob + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedScheduledJobWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedScheduledJob", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified ScheduledJob + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedScheduledJobStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedScheduledJobStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified ScheduledJob + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedScheduledJobStatusWithHttpMessagesAsync(V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedScheduledJobStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified ScheduledJob + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedScheduledJobStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedScheduledJobStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ScheduledJob + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListScheduledJobForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListScheduledJobForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/batch/v2alpha1/scheduledjobs").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get information of a group + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIGroup5WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIGroup5", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/certificates.k8s.io/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources10WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources10", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/certificates.k8s.io/v1beta1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind CertificateSigningRequest + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListCertificateSigningRequestWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListCertificateSigningRequest", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/certificates.k8s.io/v1beta1/certificatesigningrequests").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a CertificateSigningRequest + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateCertificateSigningRequestWithHttpMessagesAsync(V1beta1CertificateSigningRequest body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateCertificateSigningRequest", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/certificates.k8s.io/v1beta1/certificatesigningrequests").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of CertificateSigningRequest + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionCertificateSigningRequestWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionCertificateSigningRequest", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/certificates.k8s.io/v1beta1/certificatesigningrequests").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified CertificateSigningRequest + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadCertificateSigningRequestWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadCertificateSigningRequest", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified CertificateSigningRequest + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceCertificateSigningRequestWithHttpMessagesAsync(V1beta1CertificateSigningRequest body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceCertificateSigningRequest", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a CertificateSigningRequest + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCertificateSigningRequestWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCertificateSigningRequest", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified CertificateSigningRequest + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchCertificateSigningRequestWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchCertificateSigningRequest", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace approval of the specified CertificateSigningRequest + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceCertificateSigningRequestApprovalWithHttpMessagesAsync(V1beta1CertificateSigningRequest body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceCertificateSigningRequestApproval", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/approval").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified CertificateSigningRequest + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceCertificateSigningRequestStatusWithHttpMessagesAsync(V1beta1CertificateSigningRequest body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceCertificateSigningRequestStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get information of a group + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIGroup6WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIGroup6", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources11WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources11", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind DaemonSet + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListDaemonSetForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListDaemonSetForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/daemonsets").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Deployment + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListDeploymentForAllNamespaces1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentForAllNamespaces1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/deployments").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Ingress + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListIngressForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListIngressForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/ingresses").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedDaemonSetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedDaemonSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/daemonsets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a DaemonSet + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedDaemonSetWithHttpMessagesAsync(V1beta1DaemonSet body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedDaemonSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/daemonsets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedDaemonSetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedDaemonSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/daemonsets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified DaemonSet + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedDaemonSetWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedDaemonSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified DaemonSet + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedDaemonSetWithHttpMessagesAsync(V1beta1DaemonSet body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedDaemonSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a DaemonSet + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedDaemonSetWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedDaemonSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified DaemonSet + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedDaemonSetWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedDaemonSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified DaemonSet + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedDaemonSetStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedDaemonSetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified DaemonSet + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedDaemonSetStatusWithHttpMessagesAsync(V1beta1DaemonSet body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedDaemonSetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified DaemonSet + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedDaemonSetStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedDaemonSetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedDeployment1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedDeployment1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a Deployment + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedDeployment1WithHttpMessagesAsync(Extensionsv1beta1Deployment body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedDeployment1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedDeployment1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedDeployment1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Deployment + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedDeployment1WithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedDeployment1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedDeployment1WithHttpMessagesAsync(Extensionsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedDeployment1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedDeployment1WithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedDeployment1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedDeployment1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedDeployment1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create rollback of a DeploymentRollback + /// + /// + /// + /// + /// name of the DeploymentRollback + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedDeploymentRollbackRollback1WithHttpMessagesAsync(Extensionsv1beta1DeploymentRollback body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedDeploymentRollbackRollback1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/rollback").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read scale of the specified Scale + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedDeploymentsScaleWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedDeploymentsScale", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedDeploymentsScaleWithHttpMessagesAsync(Extensionsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedDeploymentsScale", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedDeploymentsScaleWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedDeploymentsScale", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified Deployment + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedDeploymentStatus1WithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedDeploymentStatus1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedDeploymentStatus1WithHttpMessagesAsync(Extensionsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedDeploymentStatus1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified Deployment + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedDeploymentStatus1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedDeploymentStatus1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedIngressWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedIngress", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/ingresses").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create an Ingress + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedIngressWithHttpMessagesAsync(V1beta1Ingress body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedIngress", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/ingresses").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedIngressWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedIngress", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/ingresses").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Ingress + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedIngressWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedIngress", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Ingress + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedIngressWithHttpMessagesAsync(V1beta1Ingress body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedIngress", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete an Ingress + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedIngressWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedIngress", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Ingress + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedIngressWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedIngress", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified Ingress + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedIngressStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedIngressStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified Ingress + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedIngressStatusWithHttpMessagesAsync(V1beta1Ingress body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedIngressStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified Ingress + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedIngressStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedIngressStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedNetworkPolicyWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedNetworkPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a NetworkPolicy + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedNetworkPolicyWithHttpMessagesAsync(V1beta1NetworkPolicy body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedNetworkPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedNetworkPolicyWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedNetworkPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified NetworkPolicy + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedNetworkPolicyWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedNetworkPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified NetworkPolicy + /// + /// + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedNetworkPolicyWithHttpMessagesAsync(V1beta1NetworkPolicy body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedNetworkPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a NetworkPolicy + /// + /// + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedNetworkPolicyWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedNetworkPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified NetworkPolicy + /// + /// + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedNetworkPolicyWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedNetworkPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedReplicaSetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedReplicaSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a ReplicaSet + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedReplicaSetWithHttpMessagesAsync(V1beta1ReplicaSet body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedReplicaSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedReplicaSetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedReplicaSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified ReplicaSet + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedReplicaSetWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedReplicaSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified ReplicaSet + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedReplicaSetWithHttpMessagesAsync(V1beta1ReplicaSet body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedReplicaSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a ReplicaSet + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedReplicaSetWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedReplicaSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified ReplicaSet + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedReplicaSetWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedReplicaSet", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read scale of the specified Scale + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedReplicasetsScaleWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedReplicasetsScale", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedReplicasetsScaleWithHttpMessagesAsync(Extensionsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedReplicasetsScale", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedReplicasetsScaleWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedReplicasetsScale", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified ReplicaSet + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedReplicaSetStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedReplicaSetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified ReplicaSet + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedReplicaSetStatusWithHttpMessagesAsync(V1beta1ReplicaSet body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedReplicaSetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified ReplicaSet + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedReplicaSetStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedReplicaSetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read scale of the specified Scale + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedReplicationcontrollersScaleWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedReplicationcontrollersScale", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedReplicationcontrollersScaleWithHttpMessagesAsync(Extensionsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedReplicationcontrollersScale", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedReplicationcontrollersScaleWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedReplicationcontrollersScale", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind NetworkPolicy + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNetworkPolicyForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNetworkPolicyForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/networkpolicies").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind PodSecurityPolicy + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListPodSecurityPolicyWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListPodSecurityPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/podsecuritypolicies").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a PodSecurityPolicy + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreatePodSecurityPolicyWithHttpMessagesAsync(V1beta1PodSecurityPolicy body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreatePodSecurityPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/podsecuritypolicies").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of PodSecurityPolicy + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionPodSecurityPolicyWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionPodSecurityPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/podsecuritypolicies").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified PodSecurityPolicy + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadPodSecurityPolicyWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadPodSecurityPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/podsecuritypolicies/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified PodSecurityPolicy + /// + /// + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplacePodSecurityPolicyWithHttpMessagesAsync(V1beta1PodSecurityPolicy body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplacePodSecurityPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/podsecuritypolicies/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a PodSecurityPolicy + /// + /// + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeletePodSecurityPolicyWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeletePodSecurityPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/podsecuritypolicies/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified PodSecurityPolicy + /// + /// + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchPodSecurityPolicyWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchPodSecurityPolicy", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/podsecuritypolicies/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ReplicaSet + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListReplicaSetForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListReplicaSetForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/replicasets").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ThirdPartyResource + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListThirdPartyResourceWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListThirdPartyResource", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/thirdpartyresources").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a ThirdPartyResource + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateThirdPartyResourceWithHttpMessagesAsync(V1beta1ThirdPartyResource body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateThirdPartyResource", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/thirdpartyresources").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of ThirdPartyResource + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionThirdPartyResourceWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionThirdPartyResource", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/thirdpartyresources").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified ThirdPartyResource + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadThirdPartyResourceWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadThirdPartyResource", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/thirdpartyresources/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified ThirdPartyResource + /// + /// + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceThirdPartyResourceWithHttpMessagesAsync(V1beta1ThirdPartyResource body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceThirdPartyResource", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/thirdpartyresources/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a ThirdPartyResource + /// + /// + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteThirdPartyResourceWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteThirdPartyResource", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/thirdpartyresources/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified ThirdPartyResource + /// + /// + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchThirdPartyResourceWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchThirdPartyResource", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/extensions/v1beta1/thirdpartyresources/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get information of a group + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIGroup7WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIGroup7", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources12WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources12", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/v1beta1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedPodDisruptionBudgetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedPodDisruptionBudget", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a PodDisruptionBudget + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedPodDisruptionBudgetWithHttpMessagesAsync(V1beta1PodDisruptionBudget body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedPodDisruptionBudget", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedPodDisruptionBudgetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedPodDisruptionBudget", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified PodDisruptionBudget + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedPodDisruptionBudgetWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedPodDisruptionBudget", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified PodDisruptionBudget + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedPodDisruptionBudgetWithHttpMessagesAsync(V1beta1PodDisruptionBudget body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedPodDisruptionBudget", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a PodDisruptionBudget + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedPodDisruptionBudgetWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedPodDisruptionBudget", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified PodDisruptionBudget + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedPodDisruptionBudgetWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedPodDisruptionBudget", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read status of the specified PodDisruptionBudget + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedPodDisruptionBudgetStatusWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedPodDisruptionBudgetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace status of the specified PodDisruptionBudget + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedPodDisruptionBudgetStatusWithHttpMessagesAsync(V1beta1PodDisruptionBudget body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedPodDisruptionBudgetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update status of the specified PodDisruptionBudget + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedPodDisruptionBudgetStatusWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedPodDisruptionBudgetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind PodDisruptionBudget + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListPodDisruptionBudgetForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListPodDisruptionBudgetForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/policy/v1beta1/poddisruptionbudgets").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get information of a group + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIGroup8WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIGroup8", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources13WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources13", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ClusterRoleBinding + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListClusterRoleBindingWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListClusterRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a ClusterRoleBinding + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateClusterRoleBindingWithHttpMessagesAsync(V1alpha1ClusterRoleBinding body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateClusterRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of ClusterRoleBinding + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionClusterRoleBindingWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionClusterRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified ClusterRoleBinding + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadClusterRoleBindingWithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadClusterRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified ClusterRoleBinding + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceClusterRoleBindingWithHttpMessagesAsync(V1alpha1ClusterRoleBinding body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceClusterRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a ClusterRoleBinding + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteClusterRoleBindingWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteClusterRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified ClusterRoleBinding + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchClusterRoleBindingWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchClusterRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ClusterRole + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListClusterRoleWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListClusterRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterroles").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a ClusterRole + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateClusterRoleWithHttpMessagesAsync(V1alpha1ClusterRole body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateClusterRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterroles").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of ClusterRole + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionClusterRoleWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionClusterRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterroles").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified ClusterRole + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadClusterRoleWithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadClusterRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified ClusterRole + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceClusterRoleWithHttpMessagesAsync(V1alpha1ClusterRole body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceClusterRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a ClusterRole + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteClusterRoleWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteClusterRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified ClusterRole + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchClusterRoleWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchClusterRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedRoleBindingWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a RoleBinding + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedRoleBindingWithHttpMessagesAsync(V1alpha1RoleBinding body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedRoleBindingWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified RoleBinding + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedRoleBindingWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified RoleBinding + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedRoleBindingWithHttpMessagesAsync(V1alpha1RoleBinding body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a RoleBinding + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedRoleBindingWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified RoleBinding + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedRoleBindingWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedRoleBinding", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedRoleWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a Role + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedRoleWithHttpMessagesAsync(V1alpha1Role body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedRoleWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Role + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedRoleWithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Role + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedRoleWithHttpMessagesAsync(V1alpha1Role body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a Role + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedRoleWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Role + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedRoleWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedRole", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListRoleBindingForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListRoleBindingForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/rolebindings").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Role + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListRoleForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListRoleForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1alpha1/roles").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources14WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources14", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ClusterRoleBinding + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListClusterRoleBinding1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListClusterRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a ClusterRoleBinding + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateClusterRoleBinding1WithHttpMessagesAsync(V1beta1ClusterRoleBinding body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateClusterRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of ClusterRoleBinding + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionClusterRoleBinding1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionClusterRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified ClusterRoleBinding + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadClusterRoleBinding1WithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadClusterRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified ClusterRoleBinding + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceClusterRoleBinding1WithHttpMessagesAsync(V1beta1ClusterRoleBinding body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceClusterRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a ClusterRoleBinding + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteClusterRoleBinding1WithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteClusterRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified ClusterRoleBinding + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchClusterRoleBinding1WithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchClusterRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind ClusterRole + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListClusterRole1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListClusterRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterroles").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a ClusterRole + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateClusterRole1WithHttpMessagesAsync(V1beta1ClusterRole body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateClusterRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterroles").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of ClusterRole + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionClusterRole1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionClusterRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterroles").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified ClusterRole + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadClusterRole1WithHttpMessagesAsync(string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadClusterRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified ClusterRole + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceClusterRole1WithHttpMessagesAsync(V1beta1ClusterRole body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceClusterRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a ClusterRole + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteClusterRole1WithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteClusterRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified ClusterRole + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchClusterRole1WithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchClusterRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedRoleBinding1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a RoleBinding + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedRoleBinding1WithHttpMessagesAsync(V1beta1RoleBinding body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedRoleBinding1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified RoleBinding + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedRoleBinding1WithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified RoleBinding + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedRoleBinding1WithHttpMessagesAsync(V1beta1RoleBinding body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a RoleBinding + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedRoleBinding1WithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified RoleBinding + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedRoleBinding1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedRoleBinding1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedRole1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a Role + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedRole1WithHttpMessagesAsync(V1beta1Role body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedRole1WithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified Role + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedRole1WithHttpMessagesAsync(string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified Role + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedRole1WithHttpMessagesAsync(V1beta1Role body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a Role + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedRole1WithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified Role + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedRole1WithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedRole1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListRoleBindingForAllNamespaces1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListRoleBindingForAllNamespaces1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/rolebindings").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind Role + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListRoleForAllNamespaces1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListRoleForAllNamespaces1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/rbac.authorization.k8s.io/v1beta1/roles").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get information of a group + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIGroup9WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIGroup9", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/settings.k8s.io/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources15WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources15", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/settings.k8s.io/v1alpha1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListNamespacedPodPresetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNamespacedPodPreset", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a PodPreset + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateNamespacedPodPresetWithHttpMessagesAsync(V1alpha1PodPreset body, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateNamespacedPodPreset", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionNamespacedPodPresetWithHttpMessagesAsync(string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionNamespacedPodPreset", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets").ToString(); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified PodPreset + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadNamespacedPodPresetWithHttpMessagesAsync(string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadNamespacedPodPreset", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified PodPreset + /// + /// + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceNamespacedPodPresetWithHttpMessagesAsync(V1alpha1PodPreset body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceNamespacedPodPreset", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a PodPreset + /// + /// + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteNamespacedPodPresetWithHttpMessagesAsync(V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteNamespacedPodPreset", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified PodPreset + /// + /// + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchNamespacedPodPresetWithHttpMessagesAsync(object body, string name, string namespaceParameter, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (namespaceParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "namespaceParameter"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("namespaceParameter", namespaceParameter); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchNamespacedPodPreset", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{namespace}", System.Uri.EscapeDataString(namespaceParameter)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind PodPreset + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListPodPresetForAllNamespacesWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListPodPresetForAllNamespaces", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/settings.k8s.io/v1alpha1/podpresets").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get information of a group + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIGroup10WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIGroup10", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources16WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources16", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind StorageClass + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListStorageClassWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListStorageClass", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1/storageclasses").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a StorageClass + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateStorageClassWithHttpMessagesAsync(V1StorageClass body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateStorageClass", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1/storageclasses").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of StorageClass + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionStorageClassWithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionStorageClass", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1/storageclasses").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified StorageClass + /// + /// + /// name of the StorageClass + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadStorageClassWithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadStorageClass", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1/storageclasses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified StorageClass + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceStorageClassWithHttpMessagesAsync(V1StorageClass body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceStorageClass", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1/storageclasses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a StorageClass + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteStorageClassWithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteStorageClass", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1/storageclasses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified StorageClass + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchStorageClassWithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchStorageClass", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1/storageclasses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get available resources + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAPIResources17WithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAPIResources17", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1beta1/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// list or watch objects of kind StorageClass + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListStorageClass1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListStorageClass1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1beta1/storageclasses").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// create a StorageClass + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateStorageClass1WithHttpMessagesAsync(V1beta1StorageClass body, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateStorageClass1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1beta1/storageclasses").ToString(); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete collection of StorageClass + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteCollectionStorageClass1WithHttpMessagesAsync(string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fieldSelector", fieldSelector); + tracingParameters.Add("labelSelector", labelSelector); + tracingParameters.Add("resourceVersion", resourceVersion); + tracingParameters.Add("timeoutSeconds", timeoutSeconds); + tracingParameters.Add("watch", watch); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteCollectionStorageClass1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1beta1/storageclasses").ToString(); + List _queryParameters = new List(); + if (fieldSelector != null) + { + _queryParameters.Add(string.Format("fieldSelector={0}", System.Uri.EscapeDataString(fieldSelector))); + } + if (labelSelector != null) + { + _queryParameters.Add(string.Format("labelSelector={0}", System.Uri.EscapeDataString(labelSelector))); + } + if (resourceVersion != null) + { + _queryParameters.Add(string.Format("resourceVersion={0}", System.Uri.EscapeDataString(resourceVersion))); + } + if (timeoutSeconds != null) + { + _queryParameters.Add(string.Format("timeoutSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(timeoutSeconds, SerializationSettings).Trim('"')))); + } + if (watch != null) + { + _queryParameters.Add(string.Format("watch={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(watch, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// read the specified StorageClass + /// + /// + /// name of the StorageClass + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReadStorageClass1WithHttpMessagesAsync(string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("exact", exact); + tracingParameters.Add("export", export); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReadStorageClass1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1beta1/storageclasses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (exact != null) + { + _queryParameters.Add(string.Format("exact={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(exact, SerializationSettings).Trim('"')))); + } + if (export != null) + { + _queryParameters.Add(string.Format("export={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(export, SerializationSettings).Trim('"')))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// replace the specified StorageClass + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ReplaceStorageClass1WithHttpMessagesAsync(V1beta1StorageClass body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ReplaceStorageClass1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1beta1/storageclasses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// delete a StorageClass + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteStorageClass1WithHttpMessagesAsync(V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("gracePeriodSeconds", gracePeriodSeconds); + tracingParameters.Add("orphanDependents", orphanDependents); + tracingParameters.Add("propagationPolicy", propagationPolicy); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteStorageClass1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1beta1/storageclasses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (gracePeriodSeconds != null) + { + _queryParameters.Add(string.Format("gracePeriodSeconds={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(gracePeriodSeconds, SerializationSettings).Trim('"')))); + } + if (orphanDependents != null) + { + _queryParameters.Add(string.Format("orphanDependents={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(orphanDependents, SerializationSettings).Trim('"')))); + } + if (propagationPolicy != null) + { + _queryParameters.Add(string.Format("propagationPolicy={0}", System.Uri.EscapeDataString(propagationPolicy))); + } + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("*/*"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// partially update the specified StorageClass + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> PatchStorageClass1WithHttpMessagesAsync(object body, string name, string pretty = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (body == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "body"); + } + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("name", name); + tracingParameters.Add("pretty", pretty); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "PatchStorageClass1", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/storage.k8s.io/v1beta1/storageclasses/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (pretty != null) + { + _queryParameters.Add(string.Format("pretty={0}", System.Uri.EscapeDataString(pretty))); + } + if (_queryParameters.Count > 0) + { + _url += "?" + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(body != null) + { + _requestContent = SafeJsonConvert.SerializeObject(body, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json; charset=utf-8"); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task LogFileListHandlerWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "LogFileListHandler", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "logs/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// path to the log + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task LogFileHandlerWithHttpMessagesAsync(string logpath, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (logpath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "logpath"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("logpath", logpath); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "LogFileHandler", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "logs/{logpath}").ToString(); + _url = _url.Replace("{logpath}", System.Uri.EscapeDataString(logpath)); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// get the code version + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetCodeWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetCode", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "version/").ToString(); + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 401) + { + var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + if (_httpResponse.Content != null) { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + } + else { + _responseContent = string.Empty; + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new HttpOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/generated/KubernetesExtensions.cs b/src/generated/KubernetesExtensions.cs new file mode 100755 index 000000000..b20ddbc7c --- /dev/null +++ b/src/generated/KubernetesExtensions.cs @@ -0,0 +1,30081 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s +{ + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for Kubernetes. + /// + public static partial class KubernetesExtensions + { + /// + /// get available API versions + /// + /// + /// The operations group for this extension method. + /// + public static V1APIVersions GetAPIVersions(this IKubernetes operations) + { + return operations.GetAPIVersionsAsync().GetAwaiter().GetResult(); + } + + /// + /// get available API versions + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIVersionsAsync(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIVersionsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources(this IKubernetes operations) + { + return operations.GetAPIResourcesAsync().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResourcesAsync(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResourcesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list objects of kind ComponentStatus + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1ComponentStatusList ListComponentStatus(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListComponentStatusAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list objects of kind ComponentStatus + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListComponentStatusAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListComponentStatusWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified ComponentStatus + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ComponentStatus + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ComponentStatus ReadComponentStatus(this IKubernetes operations, string name, string pretty = default(string)) + { + return operations.ReadComponentStatusAsync(name, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified ComponentStatus + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ComponentStatus + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadComponentStatusAsync(this IKubernetes operations, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadComponentStatusWithHttpMessagesAsync(name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1ConfigMapList ListConfigMapForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListConfigMapForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListConfigMapForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListConfigMapForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1EndpointsList ListEndpointsForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListEndpointsForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListEndpointsForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListEndpointsForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1EventList ListEventForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListEventForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListEventForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListEventForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1LimitRangeList ListLimitRangeForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListLimitRangeForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListLimitRangeForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListLimitRangeForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1NamespaceList ListNamespace(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespaceAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespaceAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespaceWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Namespace CreateNamespace(this IKubernetes operations, V1Namespace body, string pretty = default(string)) + { + return operations.CreateNamespaceAsync(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespaceAsync(this IKubernetes operations, V1Namespace body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespaceWithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespace(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespaceAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespaceAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespaceWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a Binding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Binding CreateNamespacedBinding(this IKubernetes operations, V1Binding body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedBindingAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a Binding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedBindingAsync(this IKubernetes operations, V1Binding body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedBindingWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ConfigMapList ListNamespacedConfigMap(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedConfigMapAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedConfigMapAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedConfigMapWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ConfigMap CreateNamespacedConfigMap(this IKubernetes operations, V1ConfigMap body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedConfigMapAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedConfigMapAsync(this IKubernetes operations, V1ConfigMap body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedConfigMapWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedConfigMap(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedConfigMapAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedConfigMapAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedConfigMapWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ConfigMap ReadNamespacedConfigMap(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedConfigMapAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedConfigMapAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedConfigMapWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ConfigMap ReplaceNamespacedConfigMap(this IKubernetes operations, V1ConfigMap body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedConfigMapAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedConfigMapAsync(this IKubernetes operations, V1ConfigMap body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedConfigMapWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedConfigMap(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedConfigMapAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedConfigMapAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedConfigMapWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ConfigMap PatchNamespacedConfigMap(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedConfigMapAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified ConfigMap + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ConfigMap + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedConfigMapAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedConfigMapWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1EndpointsList ListNamespacedEndpoints(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedEndpointsAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedEndpointsAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedEndpointsWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Endpoints CreateNamespacedEndpoints(this IKubernetes operations, V1Endpoints body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedEndpointsAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedEndpointsAsync(this IKubernetes operations, V1Endpoints body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedEndpointsWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedEndpoints(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedEndpointsAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedEndpointsAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedEndpointsWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Endpoints ReadNamespacedEndpoints(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedEndpointsAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedEndpointsAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedEndpointsWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Endpoints ReplaceNamespacedEndpoints(this IKubernetes operations, V1Endpoints body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedEndpointsAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedEndpointsAsync(this IKubernetes operations, V1Endpoints body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedEndpointsWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedEndpoints(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedEndpointsAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedEndpointsAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedEndpointsWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Endpoints PatchNamespacedEndpoints(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedEndpointsAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Endpoints + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Endpoints + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedEndpointsAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedEndpointsWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1EventList ListNamespacedEvent(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedEventAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedEventAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedEventWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create an Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Event CreateNamespacedEvent(this IKubernetes operations, V1Event body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedEventAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create an Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedEventAsync(this IKubernetes operations, V1Event body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedEventWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedEvent(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedEventAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedEventAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedEventWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Event ReadNamespacedEvent(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedEventAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedEventAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedEventWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Event ReplaceNamespacedEvent(this IKubernetes operations, V1Event body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedEventAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedEventAsync(this IKubernetes operations, V1Event body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedEventWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete an Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedEvent(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedEventAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete an Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedEventAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedEventWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Event PatchNamespacedEvent(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedEventAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Event + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Event + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedEventAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedEventWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1LimitRangeList ListNamespacedLimitRange(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedLimitRangeAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedLimitRangeAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedLimitRangeWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1LimitRange CreateNamespacedLimitRange(this IKubernetes operations, V1LimitRange body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedLimitRangeAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedLimitRangeAsync(this IKubernetes operations, V1LimitRange body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedLimitRangeWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedLimitRange(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedLimitRangeAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedLimitRangeAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedLimitRangeWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1LimitRange ReadNamespacedLimitRange(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedLimitRangeAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedLimitRangeAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedLimitRangeWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1LimitRange ReplaceNamespacedLimitRange(this IKubernetes operations, V1LimitRange body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedLimitRangeAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedLimitRangeAsync(this IKubernetes operations, V1LimitRange body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedLimitRangeWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedLimitRange(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedLimitRangeAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedLimitRangeAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedLimitRangeWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1LimitRange PatchNamespacedLimitRange(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedLimitRangeAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified LimitRange + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the LimitRange + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedLimitRangeAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedLimitRangeWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolumeClaimList ListNamespacedPersistentVolumeClaim(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedPersistentVolumeClaimAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedPersistentVolumeClaimAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedPersistentVolumeClaimWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolumeClaim CreateNamespacedPersistentVolumeClaim(this IKubernetes operations, V1PersistentVolumeClaim body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedPersistentVolumeClaimAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedPersistentVolumeClaimAsync(this IKubernetes operations, V1PersistentVolumeClaim body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedPersistentVolumeClaimWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedPersistentVolumeClaim(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedPersistentVolumeClaimAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedPersistentVolumeClaimAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedPersistentVolumeClaimWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolumeClaim ReadNamespacedPersistentVolumeClaim(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedPersistentVolumeClaimAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedPersistentVolumeClaimAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedPersistentVolumeClaimWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolumeClaim ReplaceNamespacedPersistentVolumeClaim(this IKubernetes operations, V1PersistentVolumeClaim body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedPersistentVolumeClaimAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedPersistentVolumeClaimAsync(this IKubernetes operations, V1PersistentVolumeClaim body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedPersistentVolumeClaimWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedPersistentVolumeClaim(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedPersistentVolumeClaimAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedPersistentVolumeClaimAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedPersistentVolumeClaimWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolumeClaim PatchNamespacedPersistentVolumeClaim(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedPersistentVolumeClaimAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedPersistentVolumeClaimAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedPersistentVolumeClaimWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolumeClaim ReadNamespacedPersistentVolumeClaimStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedPersistentVolumeClaimStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedPersistentVolumeClaimStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedPersistentVolumeClaimStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolumeClaim ReplaceNamespacedPersistentVolumeClaimStatus(this IKubernetes operations, V1PersistentVolumeClaim body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedPersistentVolumeClaimStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedPersistentVolumeClaimStatusAsync(this IKubernetes operations, V1PersistentVolumeClaim body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedPersistentVolumeClaimStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolumeClaim PatchNamespacedPersistentVolumeClaimStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedPersistentVolumeClaimStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolumeClaim + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedPersistentVolumeClaimStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedPersistentVolumeClaimStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PodList ListNamespacedPod(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedPodAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedPodAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedPodWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Pod CreateNamespacedPod(this IKubernetes operations, V1Pod body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedPodAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedPodAsync(this IKubernetes operations, V1Pod body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedPodWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedPod(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedPodAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedPodAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedPodWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Pod ReadNamespacedPod(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedPodAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedPodAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedPodWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Pod ReplaceNamespacedPod(this IKubernetes operations, V1Pod body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedPodAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedPodAsync(this IKubernetes operations, V1Pod body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedPodWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedPod(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedPodAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedPodAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedPodWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Pod PatchNamespacedPod(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedPodAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedPodAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedPodWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect GET requests to attach of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The container in which to execute the command. Defaults to only container + /// if there is only one container in the pod. + /// + /// + /// Stderr if true indicates that stderr is to be redirected for the attach + /// call. Defaults to true. + /// + /// + /// Stdin if true, redirects the standard input stream of the pod for this + /// call. Defaults to false. + /// + /// + /// Stdout if true indicates that stdout is to be redirected for the attach + /// call. Defaults to true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the attach call. + /// This is passed through the container runtime so the tty is allocated on the + /// worker node by the container runtime. Defaults to false. + /// + public static string ConnectGetNamespacedPodAttach(this IKubernetes operations, string name, string namespaceParameter, string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?)) + { + return operations.ConnectGetNamespacedPodAttachAsync(name, namespaceParameter, container, stderr, stdin, stdout, tty).GetAwaiter().GetResult(); + } + + /// + /// connect GET requests to attach of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The container in which to execute the command. Defaults to only container + /// if there is only one container in the pod. + /// + /// + /// Stderr if true indicates that stderr is to be redirected for the attach + /// call. Defaults to true. + /// + /// + /// Stdin if true, redirects the standard input stream of the pod for this + /// call. Defaults to false. + /// + /// + /// Stdout if true indicates that stdout is to be redirected for the attach + /// call. Defaults to true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the attach call. + /// This is passed through the container runtime so the tty is allocated on the + /// worker node by the container runtime. Defaults to false. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectGetNamespacedPodAttachAsync(this IKubernetes operations, string name, string namespaceParameter, string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectGetNamespacedPodAttachWithHttpMessagesAsync(name, namespaceParameter, container, stderr, stdin, stdout, tty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect POST requests to attach of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The container in which to execute the command. Defaults to only container + /// if there is only one container in the pod. + /// + /// + /// Stderr if true indicates that stderr is to be redirected for the attach + /// call. Defaults to true. + /// + /// + /// Stdin if true, redirects the standard input stream of the pod for this + /// call. Defaults to false. + /// + /// + /// Stdout if true indicates that stdout is to be redirected for the attach + /// call. Defaults to true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the attach call. + /// This is passed through the container runtime so the tty is allocated on the + /// worker node by the container runtime. Defaults to false. + /// + public static string ConnectPostNamespacedPodAttach(this IKubernetes operations, string name, string namespaceParameter, string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?)) + { + return operations.ConnectPostNamespacedPodAttachAsync(name, namespaceParameter, container, stderr, stdin, stdout, tty).GetAwaiter().GetResult(); + } + + /// + /// connect POST requests to attach of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The container in which to execute the command. Defaults to only container + /// if there is only one container in the pod. + /// + /// + /// Stderr if true indicates that stderr is to be redirected for the attach + /// call. Defaults to true. + /// + /// + /// Stdin if true, redirects the standard input stream of the pod for this + /// call. Defaults to false. + /// + /// + /// Stdout if true indicates that stdout is to be redirected for the attach + /// call. Defaults to true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the attach call. + /// This is passed through the container runtime so the tty is allocated on the + /// worker node by the container runtime. Defaults to false. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPostNamespacedPodAttachAsync(this IKubernetes operations, string name, string namespaceParameter, string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPostNamespacedPodAttachWithHttpMessagesAsync(name, namespaceParameter, container, stderr, stdin, stdout, tty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create binding of a Binding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Binding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Binding CreateNamespacedBindingBinding(this IKubernetes operations, V1Binding body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedBindingBindingAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create binding of a Binding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Binding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedBindingBindingAsync(this IKubernetes operations, V1Binding body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedBindingBindingWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create eviction of an Eviction + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Eviction + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1Eviction CreateNamespacedEvictionEviction(this IKubernetes operations, V1beta1Eviction body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedEvictionEvictionAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create eviction of an Eviction + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Eviction + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedEvictionEvictionAsync(this IKubernetes operations, V1beta1Eviction body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedEvictionEvictionWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect GET requests to exec of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Command is the remote command to execute. argv array. Not executed within a + /// shell. + /// + /// + /// Container in which to execute the command. Defaults to only container if + /// there is only one container in the pod. + /// + /// + /// Redirect the standard error stream of the pod for this call. Defaults to + /// true. + /// + /// + /// Redirect the standard input stream of the pod for this call. Defaults to + /// false. + /// + /// + /// Redirect the standard output stream of the pod for this call. Defaults to + /// true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the exec call. + /// Defaults to false. + /// + public static string ConnectGetNamespacedPodExec(this IKubernetes operations, string name, string namespaceParameter, string command = default(string), string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?)) + { + return operations.ConnectGetNamespacedPodExecAsync(name, namespaceParameter, command, container, stderr, stdin, stdout, tty).GetAwaiter().GetResult(); + } + + /// + /// connect GET requests to exec of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Command is the remote command to execute. argv array. Not executed within a + /// shell. + /// + /// + /// Container in which to execute the command. Defaults to only container if + /// there is only one container in the pod. + /// + /// + /// Redirect the standard error stream of the pod for this call. Defaults to + /// true. + /// + /// + /// Redirect the standard input stream of the pod for this call. Defaults to + /// false. + /// + /// + /// Redirect the standard output stream of the pod for this call. Defaults to + /// true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the exec call. + /// Defaults to false. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectGetNamespacedPodExecAsync(this IKubernetes operations, string name, string namespaceParameter, string command = default(string), string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectGetNamespacedPodExecWithHttpMessagesAsync(name, namespaceParameter, command, container, stderr, stdin, stdout, tty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect POST requests to exec of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Command is the remote command to execute. argv array. Not executed within a + /// shell. + /// + /// + /// Container in which to execute the command. Defaults to only container if + /// there is only one container in the pod. + /// + /// + /// Redirect the standard error stream of the pod for this call. Defaults to + /// true. + /// + /// + /// Redirect the standard input stream of the pod for this call. Defaults to + /// false. + /// + /// + /// Redirect the standard output stream of the pod for this call. Defaults to + /// true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the exec call. + /// Defaults to false. + /// + public static string ConnectPostNamespacedPodExec(this IKubernetes operations, string name, string namespaceParameter, string command = default(string), string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?)) + { + return operations.ConnectPostNamespacedPodExecAsync(name, namespaceParameter, command, container, stderr, stdin, stdout, tty).GetAwaiter().GetResult(); + } + + /// + /// connect POST requests to exec of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Command is the remote command to execute. argv array. Not executed within a + /// shell. + /// + /// + /// Container in which to execute the command. Defaults to only container if + /// there is only one container in the pod. + /// + /// + /// Redirect the standard error stream of the pod for this call. Defaults to + /// true. + /// + /// + /// Redirect the standard input stream of the pod for this call. Defaults to + /// false. + /// + /// + /// Redirect the standard output stream of the pod for this call. Defaults to + /// true. + /// + /// + /// TTY if true indicates that a tty will be allocated for the exec call. + /// Defaults to false. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPostNamespacedPodExecAsync(this IKubernetes operations, string name, string namespaceParameter, string command = default(string), string container = default(string), bool? stderr = default(bool?), bool? stdin = default(bool?), bool? stdout = default(bool?), bool? tty = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPostNamespacedPodExecWithHttpMessagesAsync(name, namespaceParameter, command, container, stderr, stdin, stdout, tty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read log of the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The container for which to stream logs. Defaults to only container if there + /// is one container in the pod. + /// + /// + /// Follow the log stream of the pod. Defaults to false. + /// + /// + /// If set, the number of bytes to read from the server before terminating the + /// log output. This may not display a complete final line of logging, and may + /// return slightly more or slightly less than the specified limit. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Return previous terminated container logs. Defaults to false. + /// + /// + /// A relative time in seconds before the current time from which to show logs. + /// If this value precedes the time a pod was started, only logs since the pod + /// start will be returned. If this value is in the future, no logs will be + /// returned. Only one of sinceSeconds or sinceTime may be specified. + /// + /// + /// If set, the number of lines from the end of the logs to show. If not + /// specified, logs are shown from the creation of the container or + /// sinceSeconds or sinceTime + /// + /// + /// If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every + /// line of log output. Defaults to false. + /// + public static string ReadNamespacedPodLog(this IKubernetes operations, string name, string namespaceParameter, string container = default(string), bool? follow = default(bool?), int? limitBytes = default(int?), string pretty = default(string), bool? previous = default(bool?), int? sinceSeconds = default(int?), int? tailLines = default(int?), bool? timestamps = default(bool?)) + { + return operations.ReadNamespacedPodLogAsync(name, namespaceParameter, container, follow, limitBytes, pretty, previous, sinceSeconds, tailLines, timestamps).GetAwaiter().GetResult(); + } + + /// + /// read log of the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The container for which to stream logs. Defaults to only container if there + /// is one container in the pod. + /// + /// + /// Follow the log stream of the pod. Defaults to false. + /// + /// + /// If set, the number of bytes to read from the server before terminating the + /// log output. This may not display a complete final line of logging, and may + /// return slightly more or slightly less than the specified limit. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// Return previous terminated container logs. Defaults to false. + /// + /// + /// A relative time in seconds before the current time from which to show logs. + /// If this value precedes the time a pod was started, only logs since the pod + /// start will be returned. If this value is in the future, no logs will be + /// returned. Only one of sinceSeconds or sinceTime may be specified. + /// + /// + /// If set, the number of lines from the end of the logs to show. If not + /// specified, logs are shown from the creation of the container or + /// sinceSeconds or sinceTime + /// + /// + /// If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every + /// line of log output. Defaults to false. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedPodLogAsync(this IKubernetes operations, string name, string namespaceParameter, string container = default(string), bool? follow = default(bool?), int? limitBytes = default(int?), string pretty = default(string), bool? previous = default(bool?), int? sinceSeconds = default(int?), int? tailLines = default(int?), bool? timestamps = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedPodLogWithHttpMessagesAsync(name, namespaceParameter, container, follow, limitBytes, pretty, previous, sinceSeconds, tailLines, timestamps, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect GET requests to portforward of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// List of ports to forward Required when using WebSockets + /// + public static string ConnectGetNamespacedPodPortforward(this IKubernetes operations, string name, string namespaceParameter, int? ports = default(int?)) + { + return operations.ConnectGetNamespacedPodPortforwardAsync(name, namespaceParameter, ports).GetAwaiter().GetResult(); + } + + /// + /// connect GET requests to portforward of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// List of ports to forward Required when using WebSockets + /// + /// + /// The cancellation token. + /// + public static async Task ConnectGetNamespacedPodPortforwardAsync(this IKubernetes operations, string name, string namespaceParameter, int? ports = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectGetNamespacedPodPortforwardWithHttpMessagesAsync(name, namespaceParameter, ports, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect POST requests to portforward of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// List of ports to forward Required when using WebSockets + /// + public static string ConnectPostNamespacedPodPortforward(this IKubernetes operations, string name, string namespaceParameter, int? ports = default(int?)) + { + return operations.ConnectPostNamespacedPodPortforwardAsync(name, namespaceParameter, ports).GetAwaiter().GetResult(); + } + + /// + /// connect POST requests to portforward of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// List of ports to forward Required when using WebSockets + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPostNamespacedPodPortforwardAsync(this IKubernetes operations, string name, string namespaceParameter, int? ports = default(int?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPostNamespacedPodPortforwardWithHttpMessagesAsync(name, namespaceParameter, ports, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect GET requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + public static string ConnectGetNamespacedPodProxy(this IKubernetes operations, string name, string namespaceParameter, string path = default(string)) + { + return operations.ConnectGetNamespacedPodProxyAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// connect GET requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectGetNamespacedPodProxyAsync(this IKubernetes operations, string name, string namespaceParameter, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectGetNamespacedPodProxyWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect PUT requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + public static string ConnectPutNamespacedPodProxy(this IKubernetes operations, string name, string namespaceParameter, string path = default(string)) + { + return operations.ConnectPutNamespacedPodProxyAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// connect PUT requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPutNamespacedPodProxyAsync(this IKubernetes operations, string name, string namespaceParameter, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPutNamespacedPodProxyWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect POST requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + public static string ConnectPostNamespacedPodProxy(this IKubernetes operations, string name, string namespaceParameter, string path = default(string)) + { + return operations.ConnectPostNamespacedPodProxyAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// connect POST requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPostNamespacedPodProxyAsync(this IKubernetes operations, string name, string namespaceParameter, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPostNamespacedPodProxyWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect DELETE requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + public static string ConnectDeleteNamespacedPodProxy(this IKubernetes operations, string name, string namespaceParameter, string path = default(string)) + { + return operations.ConnectDeleteNamespacedPodProxyAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// connect DELETE requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectDeleteNamespacedPodProxyAsync(this IKubernetes operations, string name, string namespaceParameter, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectDeleteNamespacedPodProxyWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect HEAD requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + public static string ConnectHeadNamespacedPodProxy(this IKubernetes operations, string name, string namespaceParameter, string path = default(string)) + { + return operations.ConnectHeadNamespacedPodProxyAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// connect HEAD requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectHeadNamespacedPodProxyAsync(this IKubernetes operations, string name, string namespaceParameter, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectHeadNamespacedPodProxyWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect GET requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + public static string ConnectGetNamespacedPodProxyWithPath(this IKubernetes operations, string name, string namespaceParameter, string path, string path1) + { + return operations.ConnectGetNamespacedPodProxyWithPathAsync(name, namespaceParameter, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect GET requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectGetNamespacedPodProxyWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectGetNamespacedPodProxyWithPathWithHttpMessagesAsync(name, namespaceParameter, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect PUT requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + public static string ConnectPutNamespacedPodProxyWithPath(this IKubernetes operations, string name, string namespaceParameter, string path, string path1) + { + return operations.ConnectPutNamespacedPodProxyWithPathAsync(name, namespaceParameter, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect PUT requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPutNamespacedPodProxyWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPutNamespacedPodProxyWithPathWithHttpMessagesAsync(name, namespaceParameter, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect POST requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + public static string ConnectPostNamespacedPodProxyWithPath(this IKubernetes operations, string name, string namespaceParameter, string path, string path1) + { + return operations.ConnectPostNamespacedPodProxyWithPathAsync(name, namespaceParameter, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect POST requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPostNamespacedPodProxyWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPostNamespacedPodProxyWithPathWithHttpMessagesAsync(name, namespaceParameter, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect DELETE requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + public static string ConnectDeleteNamespacedPodProxyWithPath(this IKubernetes operations, string name, string namespaceParameter, string path, string path1) + { + return operations.ConnectDeleteNamespacedPodProxyWithPathAsync(name, namespaceParameter, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect DELETE requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectDeleteNamespacedPodProxyWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectDeleteNamespacedPodProxyWithPathWithHttpMessagesAsync(name, namespaceParameter, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect HEAD requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + public static string ConnectHeadNamespacedPodProxyWithPath(this IKubernetes operations, string name, string namespaceParameter, string path, string path1) + { + return operations.ConnectHeadNamespacedPodProxyWithPathAsync(name, namespaceParameter, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect HEAD requests to proxy of Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to pod. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectHeadNamespacedPodProxyWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectHeadNamespacedPodProxyWithPathWithHttpMessagesAsync(name, namespaceParameter, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Pod ReadNamespacedPodStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedPodStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedPodStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedPodStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Pod ReplaceNamespacedPodStatus(this IKubernetes operations, V1Pod body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedPodStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedPodStatusAsync(this IKubernetes operations, V1Pod body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedPodStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Pod PatchNamespacedPodStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedPodStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedPodStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedPodStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PodTemplateList ListNamespacedPodTemplate(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedPodTemplateAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedPodTemplateAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedPodTemplateWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PodTemplate CreateNamespacedPodTemplate(this IKubernetes operations, V1PodTemplate body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedPodTemplateAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedPodTemplateAsync(this IKubernetes operations, V1PodTemplate body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedPodTemplateWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedPodTemplate(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedPodTemplateAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedPodTemplateAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedPodTemplateWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PodTemplate ReadNamespacedPodTemplate(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedPodTemplateAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedPodTemplateAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedPodTemplateWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PodTemplate ReplaceNamespacedPodTemplate(this IKubernetes operations, V1PodTemplate body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedPodTemplateAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedPodTemplateAsync(this IKubernetes operations, V1PodTemplate body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedPodTemplateWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedPodTemplate(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedPodTemplateAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedPodTemplateAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedPodTemplateWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PodTemplate PatchNamespacedPodTemplate(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedPodTemplateAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodTemplate + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedPodTemplateAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedPodTemplateWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ReplicationControllerList ListNamespacedReplicationController(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedReplicationControllerAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedReplicationControllerAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedReplicationControllerWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ReplicationController CreateNamespacedReplicationController(this IKubernetes operations, V1ReplicationController body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedReplicationControllerAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedReplicationControllerAsync(this IKubernetes operations, V1ReplicationController body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedReplicationControllerWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedReplicationController(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedReplicationControllerAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedReplicationControllerAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedReplicationControllerWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ReplicationController ReadNamespacedReplicationController(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedReplicationControllerAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedReplicationControllerAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedReplicationControllerWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ReplicationController ReplaceNamespacedReplicationController(this IKubernetes operations, V1ReplicationController body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedReplicationControllerAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedReplicationControllerAsync(this IKubernetes operations, V1ReplicationController body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedReplicationControllerWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedReplicationController(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedReplicationControllerAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedReplicationControllerAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedReplicationControllerWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ReplicationController PatchNamespacedReplicationController(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedReplicationControllerAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedReplicationControllerAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedReplicationControllerWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Scale ReadNamespacedScaleScale(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedScaleScaleAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedScaleScaleAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedScaleScaleWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Scale ReplaceNamespacedScaleScale(this IKubernetes operations, V1Scale body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedScaleScaleAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedScaleScaleAsync(this IKubernetes operations, V1Scale body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedScaleScaleWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Scale PatchNamespacedScaleScale(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedScaleScaleAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedScaleScaleAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedScaleScaleWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ReplicationController ReadNamespacedReplicationControllerStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedReplicationControllerStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedReplicationControllerStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedReplicationControllerStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ReplicationController ReplaceNamespacedReplicationControllerStatus(this IKubernetes operations, V1ReplicationController body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedReplicationControllerStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedReplicationControllerStatusAsync(this IKubernetes operations, V1ReplicationController body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedReplicationControllerStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ReplicationController PatchNamespacedReplicationControllerStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedReplicationControllerStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicationController + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedReplicationControllerStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedReplicationControllerStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ResourceQuotaList ListNamespacedResourceQuota(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedResourceQuotaAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedResourceQuotaAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedResourceQuotaWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ResourceQuota CreateNamespacedResourceQuota(this IKubernetes operations, V1ResourceQuota body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedResourceQuotaAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedResourceQuotaAsync(this IKubernetes operations, V1ResourceQuota body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedResourceQuotaWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedResourceQuota(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedResourceQuotaAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedResourceQuotaAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedResourceQuotaWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ResourceQuota ReadNamespacedResourceQuota(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedResourceQuotaAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedResourceQuotaAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedResourceQuotaWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ResourceQuota ReplaceNamespacedResourceQuota(this IKubernetes operations, V1ResourceQuota body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedResourceQuotaAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedResourceQuotaAsync(this IKubernetes operations, V1ResourceQuota body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedResourceQuotaWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedResourceQuota(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedResourceQuotaAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedResourceQuotaAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedResourceQuotaWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ResourceQuota PatchNamespacedResourceQuota(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedResourceQuotaAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedResourceQuotaAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedResourceQuotaWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ResourceQuota ReadNamespacedResourceQuotaStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedResourceQuotaStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedResourceQuotaStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedResourceQuotaStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ResourceQuota ReplaceNamespacedResourceQuotaStatus(this IKubernetes operations, V1ResourceQuota body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedResourceQuotaStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedResourceQuotaStatusAsync(this IKubernetes operations, V1ResourceQuota body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedResourceQuotaStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ResourceQuota PatchNamespacedResourceQuotaStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedResourceQuotaStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ResourceQuota + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedResourceQuotaStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedResourceQuotaStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1SecretList ListNamespacedSecret(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedSecretAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedSecretAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedSecretWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Secret CreateNamespacedSecret(this IKubernetes operations, V1Secret body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedSecretAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedSecretAsync(this IKubernetes operations, V1Secret body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedSecretWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedSecret(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedSecretAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedSecretAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedSecretWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Secret ReadNamespacedSecret(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedSecretAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedSecretAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedSecretWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Secret ReplaceNamespacedSecret(this IKubernetes operations, V1Secret body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedSecretAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedSecretAsync(this IKubernetes operations, V1Secret body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedSecretWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedSecret(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedSecretAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedSecretAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedSecretWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Secret PatchNamespacedSecret(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedSecretAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Secret + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedSecretAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedSecretWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ServiceAccountList ListNamespacedServiceAccount(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedServiceAccountAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedServiceAccountAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedServiceAccountWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ServiceAccount CreateNamespacedServiceAccount(this IKubernetes operations, V1ServiceAccount body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedServiceAccountAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedServiceAccountAsync(this IKubernetes operations, V1ServiceAccount body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedServiceAccountWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedServiceAccount(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedServiceAccountAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedServiceAccountAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedServiceAccountWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ServiceAccount ReadNamespacedServiceAccount(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedServiceAccountAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedServiceAccountAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedServiceAccountWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ServiceAccount ReplaceNamespacedServiceAccount(this IKubernetes operations, V1ServiceAccount body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedServiceAccountAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedServiceAccountAsync(this IKubernetes operations, V1ServiceAccount body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedServiceAccountWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedServiceAccount(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedServiceAccountAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedServiceAccountAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedServiceAccountWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ServiceAccount PatchNamespacedServiceAccount(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedServiceAccountAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ServiceAccount + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedServiceAccountAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedServiceAccountWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1ServiceList ListNamespacedService(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedServiceAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedServiceAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedServiceWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Service CreateNamespacedService(this IKubernetes operations, V1Service body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedServiceAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedServiceAsync(this IKubernetes operations, V1Service body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedServiceWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Service ReadNamespacedService(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedServiceAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedServiceAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedServiceWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Service ReplaceNamespacedService(this IKubernetes operations, V1Service body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedServiceAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedServiceAsync(this IKubernetes operations, V1Service body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedServiceWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedService(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.DeleteNamespacedServiceAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedServiceAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedServiceWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Service PatchNamespacedService(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedServiceAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedServiceAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedServiceWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect GET requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + public static string ConnectGetNamespacedServiceProxy(this IKubernetes operations, string name, string namespaceParameter, string path = default(string)) + { + return operations.ConnectGetNamespacedServiceProxyAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// connect GET requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectGetNamespacedServiceProxyAsync(this IKubernetes operations, string name, string namespaceParameter, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectGetNamespacedServiceProxyWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect PUT requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + public static string ConnectPutNamespacedServiceProxy(this IKubernetes operations, string name, string namespaceParameter, string path = default(string)) + { + return operations.ConnectPutNamespacedServiceProxyAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// connect PUT requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPutNamespacedServiceProxyAsync(this IKubernetes operations, string name, string namespaceParameter, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPutNamespacedServiceProxyWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect POST requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + public static string ConnectPostNamespacedServiceProxy(this IKubernetes operations, string name, string namespaceParameter, string path = default(string)) + { + return operations.ConnectPostNamespacedServiceProxyAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// connect POST requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPostNamespacedServiceProxyAsync(this IKubernetes operations, string name, string namespaceParameter, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPostNamespacedServiceProxyWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect DELETE requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + public static string ConnectDeleteNamespacedServiceProxy(this IKubernetes operations, string name, string namespaceParameter, string path = default(string)) + { + return operations.ConnectDeleteNamespacedServiceProxyAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// connect DELETE requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectDeleteNamespacedServiceProxyAsync(this IKubernetes operations, string name, string namespaceParameter, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectDeleteNamespacedServiceProxyWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect HEAD requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + public static string ConnectHeadNamespacedServiceProxy(this IKubernetes operations, string name, string namespaceParameter, string path = default(string)) + { + return operations.ConnectHeadNamespacedServiceProxyAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// connect HEAD requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectHeadNamespacedServiceProxyAsync(this IKubernetes operations, string name, string namespaceParameter, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectHeadNamespacedServiceProxyWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect GET requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + public static string ConnectGetNamespacedServiceProxyWithPath(this IKubernetes operations, string name, string namespaceParameter, string path, string path1) + { + return operations.ConnectGetNamespacedServiceProxyWithPathAsync(name, namespaceParameter, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect GET requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectGetNamespacedServiceProxyWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectGetNamespacedServiceProxyWithPathWithHttpMessagesAsync(name, namespaceParameter, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect PUT requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + public static string ConnectPutNamespacedServiceProxyWithPath(this IKubernetes operations, string name, string namespaceParameter, string path, string path1) + { + return operations.ConnectPutNamespacedServiceProxyWithPathAsync(name, namespaceParameter, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect PUT requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPutNamespacedServiceProxyWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPutNamespacedServiceProxyWithPathWithHttpMessagesAsync(name, namespaceParameter, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect POST requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + public static string ConnectPostNamespacedServiceProxyWithPath(this IKubernetes operations, string name, string namespaceParameter, string path, string path1) + { + return operations.ConnectPostNamespacedServiceProxyWithPathAsync(name, namespaceParameter, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect POST requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPostNamespacedServiceProxyWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPostNamespacedServiceProxyWithPathWithHttpMessagesAsync(name, namespaceParameter, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect DELETE requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + public static string ConnectDeleteNamespacedServiceProxyWithPath(this IKubernetes operations, string name, string namespaceParameter, string path, string path1) + { + return operations.ConnectDeleteNamespacedServiceProxyWithPathAsync(name, namespaceParameter, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect DELETE requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectDeleteNamespacedServiceProxyWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectDeleteNamespacedServiceProxyWithPathWithHttpMessagesAsync(name, namespaceParameter, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect HEAD requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + public static string ConnectHeadNamespacedServiceProxyWithPath(this IKubernetes operations, string name, string namespaceParameter, string path, string path1) + { + return operations.ConnectHeadNamespacedServiceProxyWithPathAsync(name, namespaceParameter, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect HEAD requests to proxy of Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// Path is the part of URLs that include service endpoints, suffixes, and + /// parameters to use for the current proxy request to service. For example, + /// the whole request URL is + /// http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. + /// Path is _search?q=user:kimchy. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectHeadNamespacedServiceProxyWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectHeadNamespacedServiceProxyWithPathWithHttpMessagesAsync(name, namespaceParameter, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Service ReadNamespacedServiceStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedServiceStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedServiceStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedServiceStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Service ReplaceNamespacedServiceStatus(this IKubernetes operations, V1Service body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedServiceStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedServiceStatusAsync(this IKubernetes operations, V1Service body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedServiceStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Service PatchNamespacedServiceStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedServiceStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedServiceStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedServiceStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Namespace + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Namespace ReadNamespace(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespaceAsync(name, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Namespace + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespaceAsync(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespaceWithHttpMessagesAsync(name, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Namespace ReplaceNamespace(this IKubernetes operations, V1Namespace body, string name, string pretty = default(string)) + { + return operations.ReplaceNamespaceAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespaceAsync(this IKubernetes operations, V1Namespace body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespaceWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespace(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespaceAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespaceAsync(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespaceWithHttpMessagesAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Namespace PatchNamespace(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchNamespaceAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespaceAsync(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespaceWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace finalize of the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Namespace ReplaceNamespaceFinalize(this IKubernetes operations, V1Namespace body, string name, string pretty = default(string)) + { + return operations.ReplaceNamespaceFinalizeAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace finalize of the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespaceFinalizeAsync(this IKubernetes operations, V1Namespace body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespaceFinalizeWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Namespace ReadNamespaceStatus(this IKubernetes operations, string name, string pretty = default(string)) + { + return operations.ReadNamespaceStatusAsync(name, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespaceStatusAsync(this IKubernetes operations, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespaceStatusWithHttpMessagesAsync(name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Namespace ReplaceNamespaceStatus(this IKubernetes operations, V1Namespace body, string name, string pretty = default(string)) + { + return operations.ReplaceNamespaceStatusAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespaceStatusAsync(this IKubernetes operations, V1Namespace body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespaceStatusWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Namespace PatchNamespaceStatus(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchNamespaceStatusAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified Namespace + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Namespace + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespaceStatusAsync(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespaceStatusWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1NodeList ListNode(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNodeAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNodeAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNodeWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Node CreateNode(this IKubernetes operations, V1Node body, string pretty = default(string)) + { + return operations.CreateNodeAsync(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNodeAsync(this IKubernetes operations, V1Node body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNodeWithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNode(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNodeAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNodeAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNodeWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Node ReadNode(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNodeAsync(name, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNodeAsync(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNodeWithHttpMessagesAsync(name, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Node ReplaceNode(this IKubernetes operations, V1Node body, string name, string pretty = default(string)) + { + return operations.ReplaceNodeAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNodeAsync(this IKubernetes operations, V1Node body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNodeWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Node + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNode(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNodeAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Node + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNodeAsync(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNodeWithHttpMessagesAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Node PatchNode(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchNodeAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNodeAsync(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNodeWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect GET requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + public static string ConnectGetNodeProxy(this IKubernetes operations, string name, string path = default(string)) + { + return operations.ConnectGetNodeProxyAsync(name, path).GetAwaiter().GetResult(); + } + + /// + /// connect GET requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectGetNodeProxyAsync(this IKubernetes operations, string name, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectGetNodeProxyWithHttpMessagesAsync(name, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect PUT requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + public static string ConnectPutNodeProxy(this IKubernetes operations, string name, string path = default(string)) + { + return operations.ConnectPutNodeProxyAsync(name, path).GetAwaiter().GetResult(); + } + + /// + /// connect PUT requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPutNodeProxyAsync(this IKubernetes operations, string name, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPutNodeProxyWithHttpMessagesAsync(name, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect POST requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + public static string ConnectPostNodeProxy(this IKubernetes operations, string name, string path = default(string)) + { + return operations.ConnectPostNodeProxyAsync(name, path).GetAwaiter().GetResult(); + } + + /// + /// connect POST requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPostNodeProxyAsync(this IKubernetes operations, string name, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPostNodeProxyWithHttpMessagesAsync(name, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect DELETE requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + public static string ConnectDeleteNodeProxy(this IKubernetes operations, string name, string path = default(string)) + { + return operations.ConnectDeleteNodeProxyAsync(name, path).GetAwaiter().GetResult(); + } + + /// + /// connect DELETE requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectDeleteNodeProxyAsync(this IKubernetes operations, string name, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectDeleteNodeProxyWithHttpMessagesAsync(name, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect HEAD requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + public static string ConnectHeadNodeProxy(this IKubernetes operations, string name, string path = default(string)) + { + return operations.ConnectHeadNodeProxyAsync(name, path).GetAwaiter().GetResult(); + } + + /// + /// connect HEAD requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectHeadNodeProxyAsync(this IKubernetes operations, string name, string path = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectHeadNodeProxyWithHttpMessagesAsync(name, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect GET requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + public static string ConnectGetNodeProxyWithPath(this IKubernetes operations, string name, string path, string path1) + { + return operations.ConnectGetNodeProxyWithPathAsync(name, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect GET requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectGetNodeProxyWithPathAsync(this IKubernetes operations, string name, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectGetNodeProxyWithPathWithHttpMessagesAsync(name, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect PUT requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + public static string ConnectPutNodeProxyWithPath(this IKubernetes operations, string name, string path, string path1) + { + return operations.ConnectPutNodeProxyWithPathAsync(name, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect PUT requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPutNodeProxyWithPathAsync(this IKubernetes operations, string name, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPutNodeProxyWithPathWithHttpMessagesAsync(name, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect POST requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + public static string ConnectPostNodeProxyWithPath(this IKubernetes operations, string name, string path, string path1) + { + return operations.ConnectPostNodeProxyWithPathAsync(name, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect POST requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectPostNodeProxyWithPathAsync(this IKubernetes operations, string name, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectPostNodeProxyWithPathWithHttpMessagesAsync(name, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect DELETE requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + public static string ConnectDeleteNodeProxyWithPath(this IKubernetes operations, string name, string path, string path1) + { + return operations.ConnectDeleteNodeProxyWithPathAsync(name, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect DELETE requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectDeleteNodeProxyWithPathAsync(this IKubernetes operations, string name, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectDeleteNodeProxyWithPathWithHttpMessagesAsync(name, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// connect HEAD requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + public static string ConnectHeadNodeProxyWithPath(this IKubernetes operations, string name, string path, string path1) + { + return operations.ConnectHeadNodeProxyWithPathAsync(name, path, path1).GetAwaiter().GetResult(); + } + + /// + /// connect HEAD requests to proxy of Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// Path is the URL path to use for the current proxy request to node. + /// + /// + /// The cancellation token. + /// + public static async Task ConnectHeadNodeProxyWithPathAsync(this IKubernetes operations, string name, string path, string path1, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ConnectHeadNodeProxyWithPathWithHttpMessagesAsync(name, path, path1, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Node ReadNodeStatus(this IKubernetes operations, string name, string pretty = default(string)) + { + return operations.ReadNodeStatusAsync(name, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNodeStatusAsync(this IKubernetes operations, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNodeStatusWithHttpMessagesAsync(name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Node ReplaceNodeStatus(this IKubernetes operations, V1Node body, string name, string pretty = default(string)) + { + return operations.ReplaceNodeStatusAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNodeStatusAsync(this IKubernetes operations, V1Node body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNodeStatusWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Node PatchNodeStatus(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchNodeStatusAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Node + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNodeStatusAsync(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNodeStatusWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1PersistentVolumeClaimList ListPersistentVolumeClaimForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListPersistentVolumeClaimForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind PersistentVolumeClaim + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListPersistentVolumeClaimForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListPersistentVolumeClaimForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolumeList ListPersistentVolume(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListPersistentVolumeAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListPersistentVolumeAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListPersistentVolumeWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolume CreatePersistentVolume(this IKubernetes operations, V1PersistentVolume body, string pretty = default(string)) + { + return operations.CreatePersistentVolumeAsync(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreatePersistentVolumeAsync(this IKubernetes operations, V1PersistentVolume body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreatePersistentVolumeWithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionPersistentVolume(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionPersistentVolumeAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionPersistentVolumeAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionPersistentVolumeWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PersistentVolume + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolume ReadPersistentVolume(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadPersistentVolumeAsync(name, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PersistentVolume + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadPersistentVolumeAsync(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadPersistentVolumeWithHttpMessagesAsync(name, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolume ReplacePersistentVolume(this IKubernetes operations, V1PersistentVolume body, string name, string pretty = default(string)) + { + return operations.ReplacePersistentVolumeAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplacePersistentVolumeAsync(this IKubernetes operations, V1PersistentVolume body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplacePersistentVolumeWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeletePersistentVolume(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeletePersistentVolumeAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeletePersistentVolumeAsync(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeletePersistentVolumeWithHttpMessagesAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolume PatchPersistentVolume(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchPersistentVolumeAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchPersistentVolumeAsync(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchPersistentVolumeWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolume ReadPersistentVolumeStatus(this IKubernetes operations, string name, string pretty = default(string)) + { + return operations.ReadPersistentVolumeStatusAsync(name, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadPersistentVolumeStatusAsync(this IKubernetes operations, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadPersistentVolumeStatusWithHttpMessagesAsync(name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolume ReplacePersistentVolumeStatus(this IKubernetes operations, V1PersistentVolume body, string name, string pretty = default(string)) + { + return operations.ReplacePersistentVolumeStatusAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplacePersistentVolumeStatusAsync(this IKubernetes operations, V1PersistentVolume body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplacePersistentVolumeStatusWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1PersistentVolume PatchPersistentVolumeStatus(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchPersistentVolumeStatusAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified PersistentVolume + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PersistentVolume + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchPersistentVolumeStatusAsync(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchPersistentVolumeStatusWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1PodList ListPodForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListPodForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListPodForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListPodForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1PodTemplateList ListPodTemplateForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListPodTemplateForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind PodTemplate + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListPodTemplateForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListPodTemplateForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy GET requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + public static string ProxyGETNamespacedPod(this IKubernetes operations, string name, string namespaceParameter) + { + return operations.ProxyGETNamespacedPodAsync(name, namespaceParameter).GetAwaiter().GetResult(); + } + + /// + /// proxy GET requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The cancellation token. + /// + public static async Task ProxyGETNamespacedPodAsync(this IKubernetes operations, string name, string namespaceParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyGETNamespacedPodWithHttpMessagesAsync(name, namespaceParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy PUT requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + public static string ProxyPUTNamespacedPod(this IKubernetes operations, string name, string namespaceParameter) + { + return operations.ProxyPUTNamespacedPodAsync(name, namespaceParameter).GetAwaiter().GetResult(); + } + + /// + /// proxy PUT requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPUTNamespacedPodAsync(this IKubernetes operations, string name, string namespaceParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPUTNamespacedPodWithHttpMessagesAsync(name, namespaceParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy POST requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + public static string ProxyPOSTNamespacedPod(this IKubernetes operations, string name, string namespaceParameter) + { + return operations.ProxyPOSTNamespacedPodAsync(name, namespaceParameter).GetAwaiter().GetResult(); + } + + /// + /// proxy POST requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPOSTNamespacedPodAsync(this IKubernetes operations, string name, string namespaceParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPOSTNamespacedPodWithHttpMessagesAsync(name, namespaceParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy DELETE requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + public static string ProxyDELETENamespacedPod(this IKubernetes operations, string name, string namespaceParameter) + { + return operations.ProxyDELETENamespacedPodAsync(name, namespaceParameter).GetAwaiter().GetResult(); + } + + /// + /// proxy DELETE requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The cancellation token. + /// + public static async Task ProxyDELETENamespacedPodAsync(this IKubernetes operations, string name, string namespaceParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyDELETENamespacedPodWithHttpMessagesAsync(name, namespaceParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy HEAD requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + public static string ProxyHEADNamespacedPod(this IKubernetes operations, string name, string namespaceParameter) + { + return operations.ProxyHEADNamespacedPodAsync(name, namespaceParameter).GetAwaiter().GetResult(); + } + + /// + /// proxy HEAD requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The cancellation token. + /// + public static async Task ProxyHEADNamespacedPodAsync(this IKubernetes operations, string name, string namespaceParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyHEADNamespacedPodWithHttpMessagesAsync(name, namespaceParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy PATCH requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + public static string ProxyPATCHNamespacedPod(this IKubernetes operations, string name, string namespaceParameter) + { + return operations.ProxyPATCHNamespacedPodAsync(name, namespaceParameter).GetAwaiter().GetResult(); + } + + /// + /// proxy PATCH requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPATCHNamespacedPodAsync(this IKubernetes operations, string name, string namespaceParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPATCHNamespacedPodWithHttpMessagesAsync(name, namespaceParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy GET requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + public static string ProxyGETNamespacedPodWithPath(this IKubernetes operations, string name, string namespaceParameter, string path) + { + return operations.ProxyGETNamespacedPodWithPathAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// proxy GET requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyGETNamespacedPodWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyGETNamespacedPodWithPathWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy PUT requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + public static string ProxyPUTNamespacedPodWithPath(this IKubernetes operations, string name, string namespaceParameter, string path) + { + return operations.ProxyPUTNamespacedPodWithPathAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// proxy PUT requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPUTNamespacedPodWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPUTNamespacedPodWithPathWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy POST requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + public static string ProxyPOSTNamespacedPodWithPath(this IKubernetes operations, string name, string namespaceParameter, string path) + { + return operations.ProxyPOSTNamespacedPodWithPathAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// proxy POST requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPOSTNamespacedPodWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPOSTNamespacedPodWithPathWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy DELETE requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + public static string ProxyDELETENamespacedPodWithPath(this IKubernetes operations, string name, string namespaceParameter, string path) + { + return operations.ProxyDELETENamespacedPodWithPathAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// proxy DELETE requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyDELETENamespacedPodWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyDELETENamespacedPodWithPathWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy HEAD requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + public static string ProxyHEADNamespacedPodWithPath(this IKubernetes operations, string name, string namespaceParameter, string path) + { + return operations.ProxyHEADNamespacedPodWithPathAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// proxy HEAD requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyHEADNamespacedPodWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyHEADNamespacedPodWithPathWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy PATCH requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + public static string ProxyPATCHNamespacedPodWithPath(this IKubernetes operations, string name, string namespaceParameter, string path) + { + return operations.ProxyPATCHNamespacedPodWithPathAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// proxy PATCH requests to Pod + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Pod + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPATCHNamespacedPodWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPATCHNamespacedPodWithPathWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy GET requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + public static string ProxyGETNamespacedService(this IKubernetes operations, string name, string namespaceParameter) + { + return operations.ProxyGETNamespacedServiceAsync(name, namespaceParameter).GetAwaiter().GetResult(); + } + + /// + /// proxy GET requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The cancellation token. + /// + public static async Task ProxyGETNamespacedServiceAsync(this IKubernetes operations, string name, string namespaceParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyGETNamespacedServiceWithHttpMessagesAsync(name, namespaceParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy PUT requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + public static string ProxyPUTNamespacedService(this IKubernetes operations, string name, string namespaceParameter) + { + return operations.ProxyPUTNamespacedServiceAsync(name, namespaceParameter).GetAwaiter().GetResult(); + } + + /// + /// proxy PUT requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPUTNamespacedServiceAsync(this IKubernetes operations, string name, string namespaceParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPUTNamespacedServiceWithHttpMessagesAsync(name, namespaceParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy POST requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + public static string ProxyPOSTNamespacedService(this IKubernetes operations, string name, string namespaceParameter) + { + return operations.ProxyPOSTNamespacedServiceAsync(name, namespaceParameter).GetAwaiter().GetResult(); + } + + /// + /// proxy POST requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPOSTNamespacedServiceAsync(this IKubernetes operations, string name, string namespaceParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPOSTNamespacedServiceWithHttpMessagesAsync(name, namespaceParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy DELETE requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + public static string ProxyDELETENamespacedService(this IKubernetes operations, string name, string namespaceParameter) + { + return operations.ProxyDELETENamespacedServiceAsync(name, namespaceParameter).GetAwaiter().GetResult(); + } + + /// + /// proxy DELETE requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The cancellation token. + /// + public static async Task ProxyDELETENamespacedServiceAsync(this IKubernetes operations, string name, string namespaceParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyDELETENamespacedServiceWithHttpMessagesAsync(name, namespaceParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy HEAD requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + public static string ProxyHEADNamespacedService(this IKubernetes operations, string name, string namespaceParameter) + { + return operations.ProxyHEADNamespacedServiceAsync(name, namespaceParameter).GetAwaiter().GetResult(); + } + + /// + /// proxy HEAD requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The cancellation token. + /// + public static async Task ProxyHEADNamespacedServiceAsync(this IKubernetes operations, string name, string namespaceParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyHEADNamespacedServiceWithHttpMessagesAsync(name, namespaceParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy PATCH requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + public static string ProxyPATCHNamespacedService(this IKubernetes operations, string name, string namespaceParameter) + { + return operations.ProxyPATCHNamespacedServiceAsync(name, namespaceParameter).GetAwaiter().GetResult(); + } + + /// + /// proxy PATCH requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPATCHNamespacedServiceAsync(this IKubernetes operations, string name, string namespaceParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPATCHNamespacedServiceWithHttpMessagesAsync(name, namespaceParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy GET requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + public static string ProxyGETNamespacedServiceWithPath(this IKubernetes operations, string name, string namespaceParameter, string path) + { + return operations.ProxyGETNamespacedServiceWithPathAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// proxy GET requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyGETNamespacedServiceWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyGETNamespacedServiceWithPathWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy PUT requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + public static string ProxyPUTNamespacedServiceWithPath(this IKubernetes operations, string name, string namespaceParameter, string path) + { + return operations.ProxyPUTNamespacedServiceWithPathAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// proxy PUT requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPUTNamespacedServiceWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPUTNamespacedServiceWithPathWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy POST requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + public static string ProxyPOSTNamespacedServiceWithPath(this IKubernetes operations, string name, string namespaceParameter, string path) + { + return operations.ProxyPOSTNamespacedServiceWithPathAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// proxy POST requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPOSTNamespacedServiceWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPOSTNamespacedServiceWithPathWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy DELETE requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + public static string ProxyDELETENamespacedServiceWithPath(this IKubernetes operations, string name, string namespaceParameter, string path) + { + return operations.ProxyDELETENamespacedServiceWithPathAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// proxy DELETE requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyDELETENamespacedServiceWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyDELETENamespacedServiceWithPathWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy HEAD requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + public static string ProxyHEADNamespacedServiceWithPath(this IKubernetes operations, string name, string namespaceParameter, string path) + { + return operations.ProxyHEADNamespacedServiceWithPathAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// proxy HEAD requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyHEADNamespacedServiceWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyHEADNamespacedServiceWithPathWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy PATCH requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + public static string ProxyPATCHNamespacedServiceWithPath(this IKubernetes operations, string name, string namespaceParameter, string path) + { + return operations.ProxyPATCHNamespacedServiceWithPathAsync(name, namespaceParameter, path).GetAwaiter().GetResult(); + } + + /// + /// proxy PATCH requests to Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Service + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPATCHNamespacedServiceWithPathAsync(this IKubernetes operations, string name, string namespaceParameter, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPATCHNamespacedServiceWithPathWithHttpMessagesAsync(name, namespaceParameter, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy GET requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + public static string ProxyGETNode(this IKubernetes operations, string name) + { + return operations.ProxyGETNodeAsync(name).GetAwaiter().GetResult(); + } + + /// + /// proxy GET requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// The cancellation token. + /// + public static async Task ProxyGETNodeAsync(this IKubernetes operations, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyGETNodeWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy PUT requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + public static string ProxyPUTNode(this IKubernetes operations, string name) + { + return operations.ProxyPUTNodeAsync(name).GetAwaiter().GetResult(); + } + + /// + /// proxy PUT requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPUTNodeAsync(this IKubernetes operations, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPUTNodeWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy POST requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + public static string ProxyPOSTNode(this IKubernetes operations, string name) + { + return operations.ProxyPOSTNodeAsync(name).GetAwaiter().GetResult(); + } + + /// + /// proxy POST requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPOSTNodeAsync(this IKubernetes operations, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPOSTNodeWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy DELETE requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + public static string ProxyDELETENode(this IKubernetes operations, string name) + { + return operations.ProxyDELETENodeAsync(name).GetAwaiter().GetResult(); + } + + /// + /// proxy DELETE requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// The cancellation token. + /// + public static async Task ProxyDELETENodeAsync(this IKubernetes operations, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyDELETENodeWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy HEAD requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + public static string ProxyHEADNode(this IKubernetes operations, string name) + { + return operations.ProxyHEADNodeAsync(name).GetAwaiter().GetResult(); + } + + /// + /// proxy HEAD requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// The cancellation token. + /// + public static async Task ProxyHEADNodeAsync(this IKubernetes operations, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyHEADNodeWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy PATCH requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + public static string ProxyPATCHNode(this IKubernetes operations, string name) + { + return operations.ProxyPATCHNodeAsync(name).GetAwaiter().GetResult(); + } + + /// + /// proxy PATCH requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPATCHNodeAsync(this IKubernetes operations, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPATCHNodeWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy GET requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + public static string ProxyGETNodeWithPath(this IKubernetes operations, string name, string path) + { + return operations.ProxyGETNodeWithPathAsync(name, path).GetAwaiter().GetResult(); + } + + /// + /// proxy GET requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyGETNodeWithPathAsync(this IKubernetes operations, string name, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyGETNodeWithPathWithHttpMessagesAsync(name, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy PUT requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + public static string ProxyPUTNodeWithPath(this IKubernetes operations, string name, string path) + { + return operations.ProxyPUTNodeWithPathAsync(name, path).GetAwaiter().GetResult(); + } + + /// + /// proxy PUT requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPUTNodeWithPathAsync(this IKubernetes operations, string name, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPUTNodeWithPathWithHttpMessagesAsync(name, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy POST requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + public static string ProxyPOSTNodeWithPath(this IKubernetes operations, string name, string path) + { + return operations.ProxyPOSTNodeWithPathAsync(name, path).GetAwaiter().GetResult(); + } + + /// + /// proxy POST requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPOSTNodeWithPathAsync(this IKubernetes operations, string name, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPOSTNodeWithPathWithHttpMessagesAsync(name, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy DELETE requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + public static string ProxyDELETENodeWithPath(this IKubernetes operations, string name, string path) + { + return operations.ProxyDELETENodeWithPathAsync(name, path).GetAwaiter().GetResult(); + } + + /// + /// proxy DELETE requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyDELETENodeWithPathAsync(this IKubernetes operations, string name, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyDELETENodeWithPathWithHttpMessagesAsync(name, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy HEAD requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + public static string ProxyHEADNodeWithPath(this IKubernetes operations, string name, string path) + { + return operations.ProxyHEADNodeWithPathAsync(name, path).GetAwaiter().GetResult(); + } + + /// + /// proxy HEAD requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyHEADNodeWithPathAsync(this IKubernetes operations, string name, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyHEADNodeWithPathWithHttpMessagesAsync(name, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// proxy PATCH requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + public static string ProxyPATCHNodeWithPath(this IKubernetes operations, string name, string path) + { + return operations.ProxyPATCHNodeWithPathAsync(name, path).GetAwaiter().GetResult(); + } + + /// + /// proxy PATCH requests to Node + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Node + /// + /// + /// path to the resource + /// + /// + /// The cancellation token. + /// + public static async Task ProxyPATCHNodeWithPathAsync(this IKubernetes operations, string name, string path, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ProxyPATCHNodeWithPathWithHttpMessagesAsync(name, path, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1ReplicationControllerList ListReplicationControllerForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListReplicationControllerForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ReplicationController + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListReplicationControllerForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListReplicationControllerForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1ResourceQuotaList ListResourceQuotaForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListResourceQuotaForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ResourceQuota + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListResourceQuotaForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListResourceQuotaForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1SecretList ListSecretForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListSecretForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Secret + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListSecretForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListSecretForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1ServiceAccountList ListServiceAccountForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListServiceAccountForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ServiceAccount + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListServiceAccountForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListServiceAccountForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1ServiceList ListServiceForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListServiceForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Service + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListServiceForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListServiceForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available API versions + /// + /// + /// The operations group for this extension method. + /// + public static V1APIGroupList GetAPIVersions1(this IKubernetes operations) + { + return operations.GetAPIVersions1Async().GetAwaiter().GetResult(); + } + + /// + /// get available API versions + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIVersions1Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIVersions1WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + public static V1APIGroup GetAPIGroup(this IKubernetes operations) + { + return operations.GetAPIGroupAsync().GetAwaiter().GetResult(); + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIGroupAsync(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIGroupWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources1(this IKubernetes operations) + { + return operations.GetAPIResources1Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources1Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources1WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static Appsv1beta1DeploymentList ListDeploymentForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListDeploymentForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListDeploymentForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListDeploymentForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Appsv1beta1DeploymentList ListNamespacedDeployment(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedDeploymentAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedDeploymentAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedDeploymentWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Appsv1beta1Deployment CreateNamespacedDeployment(this IKubernetes operations, Appsv1beta1Deployment body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedDeploymentAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedDeploymentAsync(this IKubernetes operations, Appsv1beta1Deployment body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedDeploymentWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedDeployment(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedDeploymentAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedDeploymentAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedDeploymentWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Appsv1beta1Deployment ReadNamespacedDeployment(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedDeploymentAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedDeploymentAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedDeploymentWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Appsv1beta1Deployment ReplaceNamespacedDeployment(this IKubernetes operations, Appsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedDeploymentAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedDeploymentAsync(this IKubernetes operations, Appsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedDeploymentWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedDeployment(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedDeploymentAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedDeploymentAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedDeploymentWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Appsv1beta1Deployment PatchNamespacedDeployment(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedDeploymentAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedDeploymentAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedDeploymentWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create rollback of a DeploymentRollback + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DeploymentRollback + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Appsv1beta1DeploymentRollback CreateNamespacedDeploymentRollbackRollback(this IKubernetes operations, Appsv1beta1DeploymentRollback body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedDeploymentRollbackRollbackAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create rollback of a DeploymentRollback + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DeploymentRollback + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedDeploymentRollbackRollbackAsync(this IKubernetes operations, Appsv1beta1DeploymentRollback body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedDeploymentRollbackRollbackWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Appsv1beta1Scale ReadNamespacedScaleScale1(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedScaleScale1Async(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedScaleScale1Async(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedScaleScale1WithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Appsv1beta1Scale ReplaceNamespacedScaleScale1(this IKubernetes operations, Appsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedScaleScale1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedScaleScale1Async(this IKubernetes operations, Appsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedScaleScale1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Appsv1beta1Scale PatchNamespacedScaleScale1(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedScaleScale1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedScaleScale1Async(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedScaleScale1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Appsv1beta1Deployment ReadNamespacedDeploymentStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedDeploymentStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedDeploymentStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedDeploymentStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Appsv1beta1Deployment ReplaceNamespacedDeploymentStatus(this IKubernetes operations, Appsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedDeploymentStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedDeploymentStatusAsync(this IKubernetes operations, Appsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedDeploymentStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Appsv1beta1Deployment PatchNamespacedDeploymentStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedDeploymentStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedDeploymentStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedDeploymentStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StatefulSetList ListNamespacedStatefulSet(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedStatefulSetAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedStatefulSetAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedStatefulSetWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StatefulSet CreateNamespacedStatefulSet(this IKubernetes operations, V1beta1StatefulSet body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedStatefulSetAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedStatefulSetAsync(this IKubernetes operations, V1beta1StatefulSet body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedStatefulSetWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedStatefulSet(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedStatefulSetAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedStatefulSetAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedStatefulSetWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StatefulSet ReadNamespacedStatefulSet(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedStatefulSetAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedStatefulSetAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedStatefulSetWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StatefulSet ReplaceNamespacedStatefulSet(this IKubernetes operations, V1beta1StatefulSet body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedStatefulSetAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedStatefulSetAsync(this IKubernetes operations, V1beta1StatefulSet body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedStatefulSetWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedStatefulSet(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedStatefulSetAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedStatefulSetAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedStatefulSetWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StatefulSet PatchNamespacedStatefulSet(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedStatefulSetAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedStatefulSetAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedStatefulSetWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StatefulSet ReadNamespacedStatefulSetStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedStatefulSetStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedStatefulSetStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedStatefulSetStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StatefulSet ReplaceNamespacedStatefulSetStatus(this IKubernetes operations, V1beta1StatefulSet body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedStatefulSetStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedStatefulSetStatusAsync(this IKubernetes operations, V1beta1StatefulSet body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedStatefulSetStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StatefulSet PatchNamespacedStatefulSetStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedStatefulSetStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StatefulSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedStatefulSetStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedStatefulSetStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1beta1StatefulSetList ListStatefulSetForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListStatefulSetForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind StatefulSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListStatefulSetForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListStatefulSetForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + public static V1APIGroup GetAPIGroup1(this IKubernetes operations) + { + return operations.GetAPIGroup1Async().GetAwaiter().GetResult(); + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIGroup1Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIGroup1WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources2(this IKubernetes operations) + { + return operations.GetAPIResources2Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources2Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources2WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a TokenReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1TokenReview CreateTokenReview(this IKubernetes operations, V1TokenReview body, string pretty = default(string)) + { + return operations.CreateTokenReviewAsync(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a TokenReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateTokenReviewAsync(this IKubernetes operations, V1TokenReview body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateTokenReviewWithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources3(this IKubernetes operations) + { + return operations.GetAPIResources3Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources3Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources3WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a TokenReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1TokenReview CreateTokenReview1(this IKubernetes operations, V1beta1TokenReview body, string pretty = default(string)) + { + return operations.CreateTokenReview1Async(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a TokenReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateTokenReview1Async(this IKubernetes operations, V1beta1TokenReview body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateTokenReview1WithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + public static V1APIGroup GetAPIGroup2(this IKubernetes operations) + { + return operations.GetAPIGroup2Async().GetAwaiter().GetResult(); + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIGroup2Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIGroup2WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources4(this IKubernetes operations) + { + return operations.GetAPIResources4Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources4Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources4WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a LocalSubjectAccessReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1LocalSubjectAccessReview CreateNamespacedLocalSubjectAccessReview(this IKubernetes operations, V1LocalSubjectAccessReview body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedLocalSubjectAccessReviewAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a LocalSubjectAccessReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedLocalSubjectAccessReviewAsync(this IKubernetes operations, V1LocalSubjectAccessReview body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedLocalSubjectAccessReviewWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a SelfSubjectAccessReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1SelfSubjectAccessReview CreateSelfSubjectAccessReview(this IKubernetes operations, V1SelfSubjectAccessReview body, string pretty = default(string)) + { + return operations.CreateSelfSubjectAccessReviewAsync(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a SelfSubjectAccessReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateSelfSubjectAccessReviewAsync(this IKubernetes operations, V1SelfSubjectAccessReview body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateSelfSubjectAccessReviewWithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a SubjectAccessReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1SubjectAccessReview CreateSubjectAccessReview(this IKubernetes operations, V1SubjectAccessReview body, string pretty = default(string)) + { + return operations.CreateSubjectAccessReviewAsync(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a SubjectAccessReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateSubjectAccessReviewAsync(this IKubernetes operations, V1SubjectAccessReview body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateSubjectAccessReviewWithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources5(this IKubernetes operations) + { + return operations.GetAPIResources5Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources5Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources5WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a LocalSubjectAccessReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1LocalSubjectAccessReview CreateNamespacedLocalSubjectAccessReview1(this IKubernetes operations, V1beta1LocalSubjectAccessReview body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedLocalSubjectAccessReview1Async(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a LocalSubjectAccessReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedLocalSubjectAccessReview1Async(this IKubernetes operations, V1beta1LocalSubjectAccessReview body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedLocalSubjectAccessReview1WithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a SelfSubjectAccessReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1SelfSubjectAccessReview CreateSelfSubjectAccessReview1(this IKubernetes operations, V1beta1SelfSubjectAccessReview body, string pretty = default(string)) + { + return operations.CreateSelfSubjectAccessReview1Async(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a SelfSubjectAccessReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateSelfSubjectAccessReview1Async(this IKubernetes operations, V1beta1SelfSubjectAccessReview body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateSelfSubjectAccessReview1WithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a SubjectAccessReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1SubjectAccessReview CreateSubjectAccessReview1(this IKubernetes operations, V1beta1SubjectAccessReview body, string pretty = default(string)) + { + return operations.CreateSubjectAccessReview1Async(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a SubjectAccessReview + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateSubjectAccessReview1Async(this IKubernetes operations, V1beta1SubjectAccessReview body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateSubjectAccessReview1WithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + public static V1APIGroup GetAPIGroup3(this IKubernetes operations) + { + return operations.GetAPIGroup3Async().GetAwaiter().GetResult(); + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIGroup3Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIGroup3WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources6(this IKubernetes operations) + { + return operations.GetAPIResources6Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources6Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources6WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1HorizontalPodAutoscalerList ListHorizontalPodAutoscalerForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListHorizontalPodAutoscalerForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListHorizontalPodAutoscalerForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListHorizontalPodAutoscalerForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1HorizontalPodAutoscalerList ListNamespacedHorizontalPodAutoscaler(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedHorizontalPodAutoscalerAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedHorizontalPodAutoscalerAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1HorizontalPodAutoscaler CreateNamespacedHorizontalPodAutoscaler(this IKubernetes operations, V1HorizontalPodAutoscaler body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedHorizontalPodAutoscalerAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedHorizontalPodAutoscalerAsync(this IKubernetes operations, V1HorizontalPodAutoscaler body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedHorizontalPodAutoscaler(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedHorizontalPodAutoscalerAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedHorizontalPodAutoscalerAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1HorizontalPodAutoscaler ReadNamespacedHorizontalPodAutoscaler(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedHorizontalPodAutoscalerAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedHorizontalPodAutoscalerAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1HorizontalPodAutoscaler ReplaceNamespacedHorizontalPodAutoscaler(this IKubernetes operations, V1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedHorizontalPodAutoscalerAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedHorizontalPodAutoscalerAsync(this IKubernetes operations, V1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedHorizontalPodAutoscaler(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedHorizontalPodAutoscalerAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedHorizontalPodAutoscalerAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1HorizontalPodAutoscaler PatchNamespacedHorizontalPodAutoscaler(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedHorizontalPodAutoscalerAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedHorizontalPodAutoscalerAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedHorizontalPodAutoscalerWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1HorizontalPodAutoscaler ReadNamespacedHorizontalPodAutoscalerStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedHorizontalPodAutoscalerStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedHorizontalPodAutoscalerStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedHorizontalPodAutoscalerStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1HorizontalPodAutoscaler ReplaceNamespacedHorizontalPodAutoscalerStatus(this IKubernetes operations, V1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedHorizontalPodAutoscalerStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedHorizontalPodAutoscalerStatusAsync(this IKubernetes operations, V1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedHorizontalPodAutoscalerStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1HorizontalPodAutoscaler PatchNamespacedHorizontalPodAutoscalerStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedHorizontalPodAutoscalerStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedHorizontalPodAutoscalerStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedHorizontalPodAutoscalerStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources7(this IKubernetes operations) + { + return operations.GetAPIResources7Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources7Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources7WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V2alpha1HorizontalPodAutoscalerList ListHorizontalPodAutoscalerForAllNamespaces1(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListHorizontalPodAutoscalerForAllNamespaces1Async(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListHorizontalPodAutoscalerForAllNamespaces1Async(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListHorizontalPodAutoscalerForAllNamespaces1WithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1HorizontalPodAutoscalerList ListNamespacedHorizontalPodAutoscaler1(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedHorizontalPodAutoscaler1Async(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedHorizontalPodAutoscaler1Async(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1HorizontalPodAutoscaler CreateNamespacedHorizontalPodAutoscaler1(this IKubernetes operations, V2alpha1HorizontalPodAutoscaler body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedHorizontalPodAutoscaler1Async(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedHorizontalPodAutoscaler1Async(this IKubernetes operations, V2alpha1HorizontalPodAutoscaler body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedHorizontalPodAutoscaler1(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedHorizontalPodAutoscaler1Async(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedHorizontalPodAutoscaler1Async(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1HorizontalPodAutoscaler ReadNamespacedHorizontalPodAutoscaler1(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedHorizontalPodAutoscaler1Async(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedHorizontalPodAutoscaler1Async(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1HorizontalPodAutoscaler ReplaceNamespacedHorizontalPodAutoscaler1(this IKubernetes operations, V2alpha1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedHorizontalPodAutoscaler1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedHorizontalPodAutoscaler1Async(this IKubernetes operations, V2alpha1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedHorizontalPodAutoscaler1(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedHorizontalPodAutoscaler1Async(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedHorizontalPodAutoscaler1Async(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1HorizontalPodAutoscaler PatchNamespacedHorizontalPodAutoscaler1(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedHorizontalPodAutoscaler1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedHorizontalPodAutoscaler1Async(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedHorizontalPodAutoscaler1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1HorizontalPodAutoscaler ReadNamespacedHorizontalPodAutoscalerStatus1(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedHorizontalPodAutoscalerStatus1Async(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedHorizontalPodAutoscalerStatus1Async(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedHorizontalPodAutoscalerStatus1WithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1HorizontalPodAutoscaler ReplaceNamespacedHorizontalPodAutoscalerStatus1(this IKubernetes operations, V2alpha1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedHorizontalPodAutoscalerStatus1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedHorizontalPodAutoscalerStatus1Async(this IKubernetes operations, V2alpha1HorizontalPodAutoscaler body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedHorizontalPodAutoscalerStatus1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1HorizontalPodAutoscaler PatchNamespacedHorizontalPodAutoscalerStatus1(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedHorizontalPodAutoscalerStatus1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified HorizontalPodAutoscaler + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the HorizontalPodAutoscaler + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedHorizontalPodAutoscalerStatus1Async(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedHorizontalPodAutoscalerStatus1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + public static V1APIGroup GetAPIGroup4(this IKubernetes operations) + { + return operations.GetAPIGroup4Async().GetAwaiter().GetResult(); + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIGroup4Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIGroup4WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources8(this IKubernetes operations) + { + return operations.GetAPIResources8Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources8Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources8WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1JobList ListJobForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListJobForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListJobForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListJobForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1JobList ListNamespacedJob(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedJobAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedJobAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedJobWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Job CreateNamespacedJob(this IKubernetes operations, V1Job body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedJobAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedJobAsync(this IKubernetes operations, V1Job body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedJobWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedJob(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedJobAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedJobAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedJobWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Job ReadNamespacedJob(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedJobAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedJobAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedJobWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Job ReplaceNamespacedJob(this IKubernetes operations, V1Job body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedJobAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedJobAsync(this IKubernetes operations, V1Job body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedJobWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedJob(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedJobAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedJobAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedJobWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Job PatchNamespacedJob(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedJobAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedJobAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedJobWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Job ReadNamespacedJobStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedJobStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedJobStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedJobStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Job ReplaceNamespacedJobStatus(this IKubernetes operations, V1Job body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedJobStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedJobStatusAsync(this IKubernetes operations, V1Job body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedJobStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Job PatchNamespacedJobStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedJobStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified Job + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Job + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedJobStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedJobStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources9(this IKubernetes operations) + { + return operations.GetAPIResources9Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources9Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources9WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V2alpha1CronJobList ListCronJobForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListCronJobForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListCronJobForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListCronJobForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJobList ListNamespacedCronJob(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedCronJobAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedCronJobAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedCronJobWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob CreateNamespacedCronJob(this IKubernetes operations, V2alpha1CronJob body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedCronJobAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedCronJobAsync(this IKubernetes operations, V2alpha1CronJob body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedCronJobWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedCronJob(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedCronJobAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedCronJobAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedCronJobWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob ReadNamespacedCronJob(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedCronJobAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedCronJobAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedCronJobWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob ReplaceNamespacedCronJob(this IKubernetes operations, V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedCronJobAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedCronJobAsync(this IKubernetes operations, V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedCronJobWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedCronJob(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedCronJobAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedCronJobAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedCronJobWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob PatchNamespacedCronJob(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedCronJobAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedCronJobAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedCronJobWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob ReadNamespacedCronJobStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedCronJobStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedCronJobStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedCronJobStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob ReplaceNamespacedCronJobStatus(this IKubernetes operations, V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedCronJobStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedCronJobStatusAsync(this IKubernetes operations, V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedCronJobStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob PatchNamespacedCronJobStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedCronJobStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified CronJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CronJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedCronJobStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedCronJobStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJobList ListNamespacedScheduledJob(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedScheduledJobAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedScheduledJobAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedScheduledJobWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob CreateNamespacedScheduledJob(this IKubernetes operations, V2alpha1CronJob body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedScheduledJobAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedScheduledJobAsync(this IKubernetes operations, V2alpha1CronJob body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedScheduledJobWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedScheduledJob(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedScheduledJobAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedScheduledJobAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedScheduledJobWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob ReadNamespacedScheduledJob(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedScheduledJobAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedScheduledJobAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedScheduledJobWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob ReplaceNamespacedScheduledJob(this IKubernetes operations, V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedScheduledJobAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedScheduledJobAsync(this IKubernetes operations, V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedScheduledJobWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedScheduledJob(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedScheduledJobAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedScheduledJobAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedScheduledJobWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob PatchNamespacedScheduledJob(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedScheduledJobAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedScheduledJobAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedScheduledJobWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob ReadNamespacedScheduledJobStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedScheduledJobStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedScheduledJobStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedScheduledJobStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob ReplaceNamespacedScheduledJobStatus(this IKubernetes operations, V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedScheduledJobStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedScheduledJobStatusAsync(this IKubernetes operations, V2alpha1CronJob body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedScheduledJobStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V2alpha1CronJob PatchNamespacedScheduledJobStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedScheduledJobStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ScheduledJob + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedScheduledJobStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedScheduledJobStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V2alpha1CronJobList ListScheduledJobForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListScheduledJobForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ScheduledJob + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListScheduledJobForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListScheduledJobForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + public static V1APIGroup GetAPIGroup5(this IKubernetes operations) + { + return operations.GetAPIGroup5Async().GetAwaiter().GetResult(); + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIGroup5Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIGroup5WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources10(this IKubernetes operations) + { + return operations.GetAPIResources10Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources10Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources10WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1CertificateSigningRequestList ListCertificateSigningRequest(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListCertificateSigningRequestAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListCertificateSigningRequestAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListCertificateSigningRequestWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1CertificateSigningRequest CreateCertificateSigningRequest(this IKubernetes operations, V1beta1CertificateSigningRequest body, string pretty = default(string)) + { + return operations.CreateCertificateSigningRequestAsync(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateCertificateSigningRequestAsync(this IKubernetes operations, V1beta1CertificateSigningRequest body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateCertificateSigningRequestWithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionCertificateSigningRequest(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionCertificateSigningRequestAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionCertificateSigningRequestAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionCertificateSigningRequestWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1CertificateSigningRequest ReadCertificateSigningRequest(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadCertificateSigningRequestAsync(name, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadCertificateSigningRequestAsync(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadCertificateSigningRequestWithHttpMessagesAsync(name, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1CertificateSigningRequest ReplaceCertificateSigningRequest(this IKubernetes operations, V1beta1CertificateSigningRequest body, string name, string pretty = default(string)) + { + return operations.ReplaceCertificateSigningRequestAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceCertificateSigningRequestAsync(this IKubernetes operations, V1beta1CertificateSigningRequest body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceCertificateSigningRequestWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCertificateSigningRequest(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteCertificateSigningRequestAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCertificateSigningRequestAsync(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCertificateSigningRequestWithHttpMessagesAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1CertificateSigningRequest PatchCertificateSigningRequest(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchCertificateSigningRequestAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchCertificateSigningRequestAsync(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchCertificateSigningRequestWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace approval of the specified CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1CertificateSigningRequest ReplaceCertificateSigningRequestApproval(this IKubernetes operations, V1beta1CertificateSigningRequest body, string name, string pretty = default(string)) + { + return operations.ReplaceCertificateSigningRequestApprovalAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace approval of the specified CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceCertificateSigningRequestApprovalAsync(this IKubernetes operations, V1beta1CertificateSigningRequest body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceCertificateSigningRequestApprovalWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1CertificateSigningRequest ReplaceCertificateSigningRequestStatus(this IKubernetes operations, V1beta1CertificateSigningRequest body, string name, string pretty = default(string)) + { + return operations.ReplaceCertificateSigningRequestStatusAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified CertificateSigningRequest + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the CertificateSigningRequest + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceCertificateSigningRequestStatusAsync(this IKubernetes operations, V1beta1CertificateSigningRequest body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceCertificateSigningRequestStatusWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + public static V1APIGroup GetAPIGroup6(this IKubernetes operations) + { + return operations.GetAPIGroup6Async().GetAwaiter().GetResult(); + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIGroup6Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIGroup6WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources11(this IKubernetes operations) + { + return operations.GetAPIResources11Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources11Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources11WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1beta1DaemonSetList ListDaemonSetForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListDaemonSetForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListDaemonSetForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListDaemonSetForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static Extensionsv1beta1DeploymentList ListDeploymentForAllNamespaces1(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListDeploymentForAllNamespaces1Async(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListDeploymentForAllNamespaces1Async(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListDeploymentForAllNamespaces1WithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1beta1IngressList ListIngressForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListIngressForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListIngressForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListIngressForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1DaemonSetList ListNamespacedDaemonSet(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedDaemonSetAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedDaemonSetAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedDaemonSetWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1DaemonSet CreateNamespacedDaemonSet(this IKubernetes operations, V1beta1DaemonSet body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedDaemonSetAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedDaemonSetAsync(this IKubernetes operations, V1beta1DaemonSet body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedDaemonSetWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedDaemonSet(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedDaemonSetAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedDaemonSetAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedDaemonSetWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1DaemonSet ReadNamespacedDaemonSet(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedDaemonSetAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedDaemonSetAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedDaemonSetWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1DaemonSet ReplaceNamespacedDaemonSet(this IKubernetes operations, V1beta1DaemonSet body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedDaemonSetAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedDaemonSetAsync(this IKubernetes operations, V1beta1DaemonSet body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedDaemonSetWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedDaemonSet(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedDaemonSetAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedDaemonSetAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedDaemonSetWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1DaemonSet PatchNamespacedDaemonSet(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedDaemonSetAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedDaemonSetAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedDaemonSetWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1DaemonSet ReadNamespacedDaemonSetStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedDaemonSetStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedDaemonSetStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedDaemonSetStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1DaemonSet ReplaceNamespacedDaemonSetStatus(this IKubernetes operations, V1beta1DaemonSet body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedDaemonSetStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedDaemonSetStatusAsync(this IKubernetes operations, V1beta1DaemonSet body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedDaemonSetStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1DaemonSet PatchNamespacedDaemonSetStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedDaemonSetStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified DaemonSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DaemonSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedDaemonSetStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedDaemonSetStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1DeploymentList ListNamespacedDeployment1(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedDeployment1Async(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedDeployment1Async(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedDeployment1WithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Deployment CreateNamespacedDeployment1(this IKubernetes operations, Extensionsv1beta1Deployment body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedDeployment1Async(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedDeployment1Async(this IKubernetes operations, Extensionsv1beta1Deployment body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedDeployment1WithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedDeployment1(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedDeployment1Async(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedDeployment1Async(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedDeployment1WithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Deployment ReadNamespacedDeployment1(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedDeployment1Async(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedDeployment1Async(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedDeployment1WithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Deployment ReplaceNamespacedDeployment1(this IKubernetes operations, Extensionsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedDeployment1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedDeployment1Async(this IKubernetes operations, Extensionsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedDeployment1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedDeployment1(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedDeployment1Async(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedDeployment1Async(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedDeployment1WithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Deployment PatchNamespacedDeployment1(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedDeployment1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedDeployment1Async(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedDeployment1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create rollback of a DeploymentRollback + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DeploymentRollback + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1DeploymentRollback CreateNamespacedDeploymentRollbackRollback1(this IKubernetes operations, Extensionsv1beta1DeploymentRollback body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedDeploymentRollbackRollback1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create rollback of a DeploymentRollback + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the DeploymentRollback + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedDeploymentRollbackRollback1Async(this IKubernetes operations, Extensionsv1beta1DeploymentRollback body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedDeploymentRollbackRollback1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Scale ReadNamespacedDeploymentsScale(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedDeploymentsScaleAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedDeploymentsScaleAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedDeploymentsScaleWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Scale ReplaceNamespacedDeploymentsScale(this IKubernetes operations, Extensionsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedDeploymentsScaleAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedDeploymentsScaleAsync(this IKubernetes operations, Extensionsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedDeploymentsScaleWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Scale PatchNamespacedDeploymentsScale(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedDeploymentsScaleAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedDeploymentsScaleAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedDeploymentsScaleWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Deployment ReadNamespacedDeploymentStatus1(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedDeploymentStatus1Async(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedDeploymentStatus1Async(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedDeploymentStatus1WithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Deployment ReplaceNamespacedDeploymentStatus1(this IKubernetes operations, Extensionsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedDeploymentStatus1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedDeploymentStatus1Async(this IKubernetes operations, Extensionsv1beta1Deployment body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedDeploymentStatus1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Deployment PatchNamespacedDeploymentStatus1(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedDeploymentStatus1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified Deployment + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Deployment + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedDeploymentStatus1Async(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedDeploymentStatus1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1IngressList ListNamespacedIngress(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedIngressAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedIngressAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedIngressWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create an Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1Ingress CreateNamespacedIngress(this IKubernetes operations, V1beta1Ingress body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedIngressAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create an Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedIngressAsync(this IKubernetes operations, V1beta1Ingress body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedIngressWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedIngress(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedIngressAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedIngressAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedIngressWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1Ingress ReadNamespacedIngress(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedIngressAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedIngressAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedIngressWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1Ingress ReplaceNamespacedIngress(this IKubernetes operations, V1beta1Ingress body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedIngressAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedIngressAsync(this IKubernetes operations, V1beta1Ingress body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedIngressWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete an Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedIngress(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedIngressAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete an Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedIngressAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedIngressWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1Ingress PatchNamespacedIngress(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedIngressAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedIngressAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedIngressWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1Ingress ReadNamespacedIngressStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedIngressStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedIngressStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedIngressStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1Ingress ReplaceNamespacedIngressStatus(this IKubernetes operations, V1beta1Ingress body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedIngressStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedIngressStatusAsync(this IKubernetes operations, V1beta1Ingress body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedIngressStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1Ingress PatchNamespacedIngressStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedIngressStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified Ingress + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Ingress + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedIngressStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedIngressStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1NetworkPolicyList ListNamespacedNetworkPolicy(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedNetworkPolicyAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedNetworkPolicyAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedNetworkPolicyWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1NetworkPolicy CreateNamespacedNetworkPolicy(this IKubernetes operations, V1beta1NetworkPolicy body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedNetworkPolicyAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedNetworkPolicyAsync(this IKubernetes operations, V1beta1NetworkPolicy body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedNetworkPolicyWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedNetworkPolicy(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedNetworkPolicyAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedNetworkPolicyAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedNetworkPolicyWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1NetworkPolicy ReadNamespacedNetworkPolicy(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedNetworkPolicyAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedNetworkPolicyAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedNetworkPolicyWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1NetworkPolicy ReplaceNamespacedNetworkPolicy(this IKubernetes operations, V1beta1NetworkPolicy body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedNetworkPolicyAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedNetworkPolicyAsync(this IKubernetes operations, V1beta1NetworkPolicy body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedNetworkPolicyWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedNetworkPolicy(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedNetworkPolicyAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedNetworkPolicyAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedNetworkPolicyWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1NetworkPolicy PatchNamespacedNetworkPolicy(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedNetworkPolicyAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the NetworkPolicy + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedNetworkPolicyAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedNetworkPolicyWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ReplicaSetList ListNamespacedReplicaSet(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedReplicaSetAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedReplicaSetAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedReplicaSetWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ReplicaSet CreateNamespacedReplicaSet(this IKubernetes operations, V1beta1ReplicaSet body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedReplicaSetAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedReplicaSetAsync(this IKubernetes operations, V1beta1ReplicaSet body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedReplicaSetWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedReplicaSet(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedReplicaSetAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedReplicaSetAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedReplicaSetWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ReplicaSet ReadNamespacedReplicaSet(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedReplicaSetAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedReplicaSetAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedReplicaSetWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ReplicaSet ReplaceNamespacedReplicaSet(this IKubernetes operations, V1beta1ReplicaSet body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedReplicaSetAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedReplicaSetAsync(this IKubernetes operations, V1beta1ReplicaSet body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedReplicaSetWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedReplicaSet(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedReplicaSetAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedReplicaSetAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedReplicaSetWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ReplicaSet PatchNamespacedReplicaSet(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedReplicaSetAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedReplicaSetAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedReplicaSetWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Scale ReadNamespacedReplicasetsScale(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedReplicasetsScaleAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedReplicasetsScaleAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedReplicasetsScaleWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Scale ReplaceNamespacedReplicasetsScale(this IKubernetes operations, Extensionsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedReplicasetsScaleAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedReplicasetsScaleAsync(this IKubernetes operations, Extensionsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedReplicasetsScaleWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Scale PatchNamespacedReplicasetsScale(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedReplicasetsScaleAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedReplicasetsScaleAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedReplicasetsScaleWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ReplicaSet ReadNamespacedReplicaSetStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedReplicaSetStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedReplicaSetStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedReplicaSetStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ReplicaSet ReplaceNamespacedReplicaSetStatus(this IKubernetes operations, V1beta1ReplicaSet body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedReplicaSetStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedReplicaSetStatusAsync(this IKubernetes operations, V1beta1ReplicaSet body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedReplicaSetStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ReplicaSet PatchNamespacedReplicaSetStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedReplicaSetStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ReplicaSet + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedReplicaSetStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedReplicaSetStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Scale ReadNamespacedReplicationcontrollersScale(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedReplicationcontrollersScaleAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedReplicationcontrollersScaleAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedReplicationcontrollersScaleWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Scale ReplaceNamespacedReplicationcontrollersScale(this IKubernetes operations, Extensionsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedReplicationcontrollersScaleAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedReplicationcontrollersScaleAsync(this IKubernetes operations, Extensionsv1beta1Scale body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedReplicationcontrollersScaleWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static Extensionsv1beta1Scale PatchNamespacedReplicationcontrollersScale(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedReplicationcontrollersScaleAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update scale of the specified Scale + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Scale + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedReplicationcontrollersScaleAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedReplicationcontrollersScaleWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1beta1NetworkPolicyList ListNetworkPolicyForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListNetworkPolicyForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind NetworkPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListNetworkPolicyForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNetworkPolicyForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodSecurityPolicyList ListPodSecurityPolicy(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListPodSecurityPolicyAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListPodSecurityPolicyAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListPodSecurityPolicyWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodSecurityPolicy CreatePodSecurityPolicy(this IKubernetes operations, V1beta1PodSecurityPolicy body, string pretty = default(string)) + { + return operations.CreatePodSecurityPolicyAsync(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreatePodSecurityPolicyAsync(this IKubernetes operations, V1beta1PodSecurityPolicy body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreatePodSecurityPolicyWithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionPodSecurityPolicy(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionPodSecurityPolicyAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionPodSecurityPolicyAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionPodSecurityPolicyWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodSecurityPolicy ReadPodSecurityPolicy(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadPodSecurityPolicyAsync(name, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadPodSecurityPolicyAsync(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadPodSecurityPolicyWithHttpMessagesAsync(name, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodSecurityPolicy ReplacePodSecurityPolicy(this IKubernetes operations, V1beta1PodSecurityPolicy body, string name, string pretty = default(string)) + { + return operations.ReplacePodSecurityPolicyAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplacePodSecurityPolicyAsync(this IKubernetes operations, V1beta1PodSecurityPolicy body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplacePodSecurityPolicyWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeletePodSecurityPolicy(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeletePodSecurityPolicyAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeletePodSecurityPolicyAsync(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeletePodSecurityPolicyWithHttpMessagesAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodSecurityPolicy PatchPodSecurityPolicy(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchPodSecurityPolicyAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified PodSecurityPolicy + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodSecurityPolicy + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchPodSecurityPolicyAsync(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchPodSecurityPolicyWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1beta1ReplicaSetList ListReplicaSetForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListReplicaSetForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ReplicaSet + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListReplicaSetForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListReplicaSetForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ThirdPartyResourceList ListThirdPartyResource(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListThirdPartyResourceAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListThirdPartyResourceAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListThirdPartyResourceWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ThirdPartyResource CreateThirdPartyResource(this IKubernetes operations, V1beta1ThirdPartyResource body, string pretty = default(string)) + { + return operations.CreateThirdPartyResourceAsync(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateThirdPartyResourceAsync(this IKubernetes operations, V1beta1ThirdPartyResource body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateThirdPartyResourceWithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionThirdPartyResource(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionThirdPartyResourceAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionThirdPartyResourceAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionThirdPartyResourceWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ThirdPartyResource ReadThirdPartyResource(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadThirdPartyResourceAsync(name, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadThirdPartyResourceAsync(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadThirdPartyResourceWithHttpMessagesAsync(name, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ThirdPartyResource ReplaceThirdPartyResource(this IKubernetes operations, V1beta1ThirdPartyResource body, string name, string pretty = default(string)) + { + return operations.ReplaceThirdPartyResourceAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceThirdPartyResourceAsync(this IKubernetes operations, V1beta1ThirdPartyResource body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceThirdPartyResourceWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteThirdPartyResource(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteThirdPartyResourceAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteThirdPartyResourceAsync(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteThirdPartyResourceWithHttpMessagesAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ThirdPartyResource PatchThirdPartyResource(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchThirdPartyResourceAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified ThirdPartyResource + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ThirdPartyResource + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchThirdPartyResourceAsync(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchThirdPartyResourceWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + public static V1APIGroup GetAPIGroup7(this IKubernetes operations) + { + return operations.GetAPIGroup7Async().GetAwaiter().GetResult(); + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIGroup7Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIGroup7WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources12(this IKubernetes operations) + { + return operations.GetAPIResources12Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources12Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources12WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodDisruptionBudgetList ListNamespacedPodDisruptionBudget(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedPodDisruptionBudgetAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedPodDisruptionBudgetAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedPodDisruptionBudgetWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodDisruptionBudget CreateNamespacedPodDisruptionBudget(this IKubernetes operations, V1beta1PodDisruptionBudget body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedPodDisruptionBudgetAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedPodDisruptionBudgetAsync(this IKubernetes operations, V1beta1PodDisruptionBudget body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedPodDisruptionBudgetWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedPodDisruptionBudget(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedPodDisruptionBudgetAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedPodDisruptionBudgetAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedPodDisruptionBudgetWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodDisruptionBudget ReadNamespacedPodDisruptionBudget(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedPodDisruptionBudgetAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedPodDisruptionBudgetAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedPodDisruptionBudgetWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodDisruptionBudget ReplaceNamespacedPodDisruptionBudget(this IKubernetes operations, V1beta1PodDisruptionBudget body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedPodDisruptionBudgetAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedPodDisruptionBudgetAsync(this IKubernetes operations, V1beta1PodDisruptionBudget body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedPodDisruptionBudgetWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedPodDisruptionBudget(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedPodDisruptionBudgetAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedPodDisruptionBudgetAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedPodDisruptionBudgetWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodDisruptionBudget PatchNamespacedPodDisruptionBudget(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedPodDisruptionBudgetAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedPodDisruptionBudgetAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedPodDisruptionBudgetWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read status of the specified PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodDisruptionBudget ReadNamespacedPodDisruptionBudgetStatus(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedPodDisruptionBudgetStatusAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read status of the specified PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedPodDisruptionBudgetStatusAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedPodDisruptionBudgetStatusWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace status of the specified PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodDisruptionBudget ReplaceNamespacedPodDisruptionBudgetStatus(this IKubernetes operations, V1beta1PodDisruptionBudget body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedPodDisruptionBudgetStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace status of the specified PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedPodDisruptionBudgetStatusAsync(this IKubernetes operations, V1beta1PodDisruptionBudget body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedPodDisruptionBudgetStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update status of the specified PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1PodDisruptionBudget PatchNamespacedPodDisruptionBudgetStatus(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedPodDisruptionBudgetStatusAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update status of the specified PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodDisruptionBudget + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedPodDisruptionBudgetStatusAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedPodDisruptionBudgetStatusWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1beta1PodDisruptionBudgetList ListPodDisruptionBudgetForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListPodDisruptionBudgetForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind PodDisruptionBudget + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListPodDisruptionBudgetForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListPodDisruptionBudgetForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + public static V1APIGroup GetAPIGroup8(this IKubernetes operations) + { + return operations.GetAPIGroup8Async().GetAwaiter().GetResult(); + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIGroup8Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIGroup8WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources13(this IKubernetes operations) + { + return operations.GetAPIResources13Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources13Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources13WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1ClusterRoleBindingList ListClusterRoleBinding(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListClusterRoleBindingAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListClusterRoleBindingAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListClusterRoleBindingWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1ClusterRoleBinding CreateClusterRoleBinding(this IKubernetes operations, V1alpha1ClusterRoleBinding body, string pretty = default(string)) + { + return operations.CreateClusterRoleBindingAsync(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateClusterRoleBindingAsync(this IKubernetes operations, V1alpha1ClusterRoleBinding body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateClusterRoleBindingWithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionClusterRoleBinding(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionClusterRoleBindingAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionClusterRoleBindingAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionClusterRoleBindingWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1ClusterRoleBinding ReadClusterRoleBinding(this IKubernetes operations, string name, string pretty = default(string)) + { + return operations.ReadClusterRoleBindingAsync(name, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadClusterRoleBindingAsync(this IKubernetes operations, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadClusterRoleBindingWithHttpMessagesAsync(name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1ClusterRoleBinding ReplaceClusterRoleBinding(this IKubernetes operations, V1alpha1ClusterRoleBinding body, string name, string pretty = default(string)) + { + return operations.ReplaceClusterRoleBindingAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceClusterRoleBindingAsync(this IKubernetes operations, V1alpha1ClusterRoleBinding body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceClusterRoleBindingWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteClusterRoleBinding(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteClusterRoleBindingAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteClusterRoleBindingAsync(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteClusterRoleBindingWithHttpMessagesAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1ClusterRoleBinding PatchClusterRoleBinding(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchClusterRoleBindingAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchClusterRoleBindingAsync(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchClusterRoleBindingWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1ClusterRoleList ListClusterRole(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListClusterRoleAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListClusterRoleAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListClusterRoleWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1ClusterRole CreateClusterRole(this IKubernetes operations, V1alpha1ClusterRole body, string pretty = default(string)) + { + return operations.CreateClusterRoleAsync(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateClusterRoleAsync(this IKubernetes operations, V1alpha1ClusterRole body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateClusterRoleWithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionClusterRole(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionClusterRoleAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionClusterRoleAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionClusterRoleWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1ClusterRole ReadClusterRole(this IKubernetes operations, string name, string pretty = default(string)) + { + return operations.ReadClusterRoleAsync(name, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadClusterRoleAsync(this IKubernetes operations, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadClusterRoleWithHttpMessagesAsync(name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1ClusterRole ReplaceClusterRole(this IKubernetes operations, V1alpha1ClusterRole body, string name, string pretty = default(string)) + { + return operations.ReplaceClusterRoleAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceClusterRoleAsync(this IKubernetes operations, V1alpha1ClusterRole body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceClusterRoleWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteClusterRole(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteClusterRoleAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteClusterRoleAsync(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteClusterRoleWithHttpMessagesAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1ClusterRole PatchClusterRole(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchClusterRoleAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchClusterRoleAsync(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchClusterRoleWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1RoleBindingList ListNamespacedRoleBinding(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedRoleBindingAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedRoleBindingAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedRoleBindingWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1RoleBinding CreateNamespacedRoleBinding(this IKubernetes operations, V1alpha1RoleBinding body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedRoleBindingAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedRoleBindingAsync(this IKubernetes operations, V1alpha1RoleBinding body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedRoleBindingWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedRoleBinding(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedRoleBindingAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedRoleBindingAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedRoleBindingWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1RoleBinding ReadNamespacedRoleBinding(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedRoleBindingAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedRoleBindingAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedRoleBindingWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1RoleBinding ReplaceNamespacedRoleBinding(this IKubernetes operations, V1alpha1RoleBinding body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedRoleBindingAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedRoleBindingAsync(this IKubernetes operations, V1alpha1RoleBinding body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedRoleBindingWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedRoleBinding(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedRoleBindingAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedRoleBindingAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedRoleBindingWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1RoleBinding PatchNamespacedRoleBinding(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedRoleBindingAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedRoleBindingAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedRoleBindingWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1RoleList ListNamespacedRole(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedRoleAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedRoleAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedRoleWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1Role CreateNamespacedRole(this IKubernetes operations, V1alpha1Role body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedRoleAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedRoleAsync(this IKubernetes operations, V1alpha1Role body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedRoleWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedRole(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedRoleAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedRoleAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedRoleWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1Role ReadNamespacedRole(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedRoleAsync(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedRoleAsync(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedRoleWithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1Role ReplaceNamespacedRole(this IKubernetes operations, V1alpha1Role body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedRoleAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedRoleAsync(this IKubernetes operations, V1alpha1Role body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedRoleWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedRole(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedRoleAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedRoleAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedRoleWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1Role PatchNamespacedRole(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedRoleAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedRoleAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedRoleWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1alpha1RoleBindingList ListRoleBindingForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListRoleBindingForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListRoleBindingForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListRoleBindingForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1alpha1RoleList ListRoleForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListRoleForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListRoleForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListRoleForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources14(this IKubernetes operations) + { + return operations.GetAPIResources14Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources14Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources14WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ClusterRoleBindingList ListClusterRoleBinding1(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListClusterRoleBinding1Async(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListClusterRoleBinding1Async(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListClusterRoleBinding1WithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ClusterRoleBinding CreateClusterRoleBinding1(this IKubernetes operations, V1beta1ClusterRoleBinding body, string pretty = default(string)) + { + return operations.CreateClusterRoleBinding1Async(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateClusterRoleBinding1Async(this IKubernetes operations, V1beta1ClusterRoleBinding body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateClusterRoleBinding1WithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionClusterRoleBinding1(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionClusterRoleBinding1Async(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionClusterRoleBinding1Async(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionClusterRoleBinding1WithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ClusterRoleBinding ReadClusterRoleBinding1(this IKubernetes operations, string name, string pretty = default(string)) + { + return operations.ReadClusterRoleBinding1Async(name, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadClusterRoleBinding1Async(this IKubernetes operations, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadClusterRoleBinding1WithHttpMessagesAsync(name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ClusterRoleBinding ReplaceClusterRoleBinding1(this IKubernetes operations, V1beta1ClusterRoleBinding body, string name, string pretty = default(string)) + { + return operations.ReplaceClusterRoleBinding1Async(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceClusterRoleBinding1Async(this IKubernetes operations, V1beta1ClusterRoleBinding body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceClusterRoleBinding1WithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteClusterRoleBinding1(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteClusterRoleBinding1Async(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteClusterRoleBinding1Async(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteClusterRoleBinding1WithHttpMessagesAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ClusterRoleBinding PatchClusterRoleBinding1(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchClusterRoleBinding1Async(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified ClusterRoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRoleBinding + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchClusterRoleBinding1Async(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchClusterRoleBinding1WithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ClusterRoleList ListClusterRole1(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListClusterRole1Async(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListClusterRole1Async(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListClusterRole1WithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ClusterRole CreateClusterRole1(this IKubernetes operations, V1beta1ClusterRole body, string pretty = default(string)) + { + return operations.CreateClusterRole1Async(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateClusterRole1Async(this IKubernetes operations, V1beta1ClusterRole body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateClusterRole1WithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionClusterRole1(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionClusterRole1Async(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionClusterRole1Async(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionClusterRole1WithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ClusterRole ReadClusterRole1(this IKubernetes operations, string name, string pretty = default(string)) + { + return operations.ReadClusterRole1Async(name, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadClusterRole1Async(this IKubernetes operations, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadClusterRole1WithHttpMessagesAsync(name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ClusterRole ReplaceClusterRole1(this IKubernetes operations, V1beta1ClusterRole body, string name, string pretty = default(string)) + { + return operations.ReplaceClusterRole1Async(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceClusterRole1Async(this IKubernetes operations, V1beta1ClusterRole body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceClusterRole1WithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteClusterRole1(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteClusterRole1Async(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteClusterRole1Async(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteClusterRole1WithHttpMessagesAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1ClusterRole PatchClusterRole1(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchClusterRole1Async(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified ClusterRole + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the ClusterRole + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchClusterRole1Async(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchClusterRole1WithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1RoleBindingList ListNamespacedRoleBinding1(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedRoleBinding1Async(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedRoleBinding1Async(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedRoleBinding1WithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1RoleBinding CreateNamespacedRoleBinding1(this IKubernetes operations, V1beta1RoleBinding body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedRoleBinding1Async(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedRoleBinding1Async(this IKubernetes operations, V1beta1RoleBinding body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedRoleBinding1WithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedRoleBinding1(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedRoleBinding1Async(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedRoleBinding1Async(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedRoleBinding1WithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1RoleBinding ReadNamespacedRoleBinding1(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedRoleBinding1Async(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedRoleBinding1Async(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedRoleBinding1WithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1RoleBinding ReplaceNamespacedRoleBinding1(this IKubernetes operations, V1beta1RoleBinding body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedRoleBinding1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedRoleBinding1Async(this IKubernetes operations, V1beta1RoleBinding body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedRoleBinding1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedRoleBinding1(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedRoleBinding1Async(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedRoleBinding1Async(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedRoleBinding1WithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1RoleBinding PatchNamespacedRoleBinding1(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedRoleBinding1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the RoleBinding + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedRoleBinding1Async(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedRoleBinding1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1RoleList ListNamespacedRole1(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedRole1Async(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedRole1Async(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedRole1WithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1Role CreateNamespacedRole1(this IKubernetes operations, V1beta1Role body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedRole1Async(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedRole1Async(this IKubernetes operations, V1beta1Role body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedRole1WithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedRole1(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedRole1Async(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedRole1Async(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedRole1WithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1Role ReadNamespacedRole1(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReadNamespacedRole1Async(name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedRole1Async(this IKubernetes operations, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedRole1WithHttpMessagesAsync(name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1Role ReplaceNamespacedRole1(this IKubernetes operations, V1beta1Role body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedRole1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedRole1Async(this IKubernetes operations, V1beta1Role body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedRole1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedRole1(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedRole1Async(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedRole1Async(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedRole1WithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1Role PatchNamespacedRole1(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedRole1Async(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the Role + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedRole1Async(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedRole1WithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1beta1RoleBindingList ListRoleBindingForAllNamespaces1(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListRoleBindingForAllNamespaces1Async(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind RoleBinding + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListRoleBindingForAllNamespaces1Async(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListRoleBindingForAllNamespaces1WithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1beta1RoleList ListRoleForAllNamespaces1(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListRoleForAllNamespaces1Async(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind Role + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListRoleForAllNamespaces1Async(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListRoleForAllNamespaces1WithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + public static V1APIGroup GetAPIGroup9(this IKubernetes operations) + { + return operations.GetAPIGroup9Async().GetAwaiter().GetResult(); + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIGroup9Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIGroup9WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources15(this IKubernetes operations) + { + return operations.GetAPIResources15Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources15Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources15WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1PodPresetList ListNamespacedPodPreset(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListNamespacedPodPresetAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListNamespacedPodPresetAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNamespacedPodPresetWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1PodPreset CreateNamespacedPodPreset(this IKubernetes operations, V1alpha1PodPreset body, string namespaceParameter, string pretty = default(string)) + { + return operations.CreateNamespacedPodPresetAsync(body, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateNamespacedPodPresetAsync(this IKubernetes operations, V1alpha1PodPreset body, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateNamespacedPodPresetWithHttpMessagesAsync(body, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionNamespacedPodPreset(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionNamespacedPodPresetAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionNamespacedPodPresetAsync(this IKubernetes operations, string namespaceParameter, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionNamespacedPodPresetWithHttpMessagesAsync(namespaceParameter, fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1PodPreset ReadNamespacedPodPreset(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadNamespacedPodPresetAsync(name, namespaceParameter, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadNamespacedPodPresetAsync(this IKubernetes operations, string name, string namespaceParameter, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadNamespacedPodPresetWithHttpMessagesAsync(name, namespaceParameter, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1PodPreset ReplaceNamespacedPodPreset(this IKubernetes operations, V1alpha1PodPreset body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.ReplaceNamespacedPodPresetAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceNamespacedPodPresetAsync(this IKubernetes operations, V1alpha1PodPreset body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceNamespacedPodPresetWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteNamespacedPodPreset(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteNamespacedPodPresetAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteNamespacedPodPresetAsync(this IKubernetes operations, V1DeleteOptions body, string name, string namespaceParameter, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteNamespacedPodPresetWithHttpMessagesAsync(body, name, namespaceParameter, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1alpha1PodPreset PatchNamespacedPodPreset(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string)) + { + return operations.PatchNamespacedPodPresetAsync(body, name, namespaceParameter, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the PodPreset + /// + /// + /// object name and auth scope, such as for teams and projects + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchNamespacedPodPresetAsync(this IKubernetes operations, object body, string name, string namespaceParameter, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchNamespacedPodPresetWithHttpMessagesAsync(body, name, namespaceParameter, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + public static V1alpha1PodPresetList ListPodPresetForAllNamespaces(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?)) + { + return operations.ListPodPresetForAllNamespacesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind PodPreset + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// The cancellation token. + /// + public static async Task ListPodPresetForAllNamespacesAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string pretty = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListPodPresetForAllNamespacesWithHttpMessagesAsync(fieldSelector, labelSelector, pretty, resourceVersion, timeoutSeconds, watch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + public static V1APIGroup GetAPIGroup10(this IKubernetes operations) + { + return operations.GetAPIGroup10Async().GetAwaiter().GetResult(); + } + + /// + /// get information of a group + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIGroup10Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIGroup10WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources16(this IKubernetes operations) + { + return operations.GetAPIResources16Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources16Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources16WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1StorageClassList ListStorageClass(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListStorageClassAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListStorageClassAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListStorageClassWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1StorageClass CreateStorageClass(this IKubernetes operations, V1StorageClass body, string pretty = default(string)) + { + return operations.CreateStorageClassAsync(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateStorageClassAsync(this IKubernetes operations, V1StorageClass body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateStorageClassWithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionStorageClass(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionStorageClassAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionStorageClassAsync(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionStorageClassWithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the StorageClass + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1StorageClass ReadStorageClass(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadStorageClassAsync(name, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the StorageClass + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadStorageClassAsync(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadStorageClassWithHttpMessagesAsync(name, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1StorageClass ReplaceStorageClass(this IKubernetes operations, V1StorageClass body, string name, string pretty = default(string)) + { + return operations.ReplaceStorageClassAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceStorageClassAsync(this IKubernetes operations, V1StorageClass body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceStorageClassWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteStorageClass(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteStorageClassAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteStorageClassAsync(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteStorageClassWithHttpMessagesAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1StorageClass PatchStorageClass(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchStorageClassAsync(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchStorageClassAsync(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchStorageClassWithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + public static V1APIResourceList GetAPIResources17(this IKubernetes operations) + { + return operations.GetAPIResources17Async().GetAwaiter().GetResult(); + } + + /// + /// get available resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetAPIResources17Async(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAPIResources17WithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// list or watch objects of kind StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StorageClassList ListStorageClass1(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.ListStorageClass1Async(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// list or watch objects of kind StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ListStorageClass1Async(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListStorageClass1WithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// create a StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StorageClass CreateStorageClass1(this IKubernetes operations, V1beta1StorageClass body, string pretty = default(string)) + { + return operations.CreateStorageClass1Async(body, pretty).GetAwaiter().GetResult(); + } + + /// + /// create a StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task CreateStorageClass1Async(this IKubernetes operations, V1beta1StorageClass body, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateStorageClass1WithHttpMessagesAsync(body, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete collection of StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteCollectionStorageClass1(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string)) + { + return operations.DeleteCollectionStorageClass1Async(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete collection of StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// A selector to restrict the list of returned objects by their fields. + /// Defaults to everything. + /// + /// + /// A selector to restrict the list of returned objects by their labels. + /// Defaults to everything. + /// + /// + /// When specified with a watch call, shows changes that occur after that + /// particular version of a resource. Defaults to changes from the beginning of + /// history. When specified for list: - if unset, then the result is returned + /// from remote storage based on quorum-read flag; - if it's 0, then we simply + /// return what we currently have in cache, no guarantee; - if set to non zero, + /// then the result is at least as fresh as given rv. + /// + /// + /// Timeout for the list/watch call. + /// + /// + /// Watch for changes to the described resources and return them as a stream of + /// add, update, and remove notifications. Specify resourceVersion. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteCollectionStorageClass1Async(this IKubernetes operations, string fieldSelector = default(string), string labelSelector = default(string), string resourceVersion = default(string), int? timeoutSeconds = default(int?), bool? watch = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteCollectionStorageClass1WithHttpMessagesAsync(fieldSelector, labelSelector, resourceVersion, timeoutSeconds, watch, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// read the specified StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the StorageClass + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StorageClass ReadStorageClass1(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string)) + { + return operations.ReadStorageClass1Async(name, exact, export, pretty).GetAwaiter().GetResult(); + } + + /// + /// read the specified StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// name of the StorageClass + /// + /// + /// Should the export be exact. Exact export maintains cluster-specific fields + /// like 'Namespace'. + /// + /// + /// Should this value be exported. Export strips fields that a user can not + /// specify. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReadStorageClass1Async(this IKubernetes operations, string name, bool? exact = default(bool?), bool? export = default(bool?), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReadStorageClass1WithHttpMessagesAsync(name, exact, export, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// replace the specified StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StorageClass ReplaceStorageClass1(this IKubernetes operations, V1beta1StorageClass body, string name, string pretty = default(string)) + { + return operations.ReplaceStorageClass1Async(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// replace the specified StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task ReplaceStorageClass1Async(this IKubernetes operations, V1beta1StorageClass body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ReplaceStorageClass1WithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// delete a StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1Status DeleteStorageClass1(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string)) + { + return operations.DeleteStorageClass1Async(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty).GetAwaiter().GetResult(); + } + + /// + /// delete a StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// The duration in seconds before the object should be deleted. Value must be + /// non-negative integer. The value zero indicates delete immediately. If this + /// value is nil, the default grace period for the specified type will be used. + /// Defaults to a per object value if not specified. zero means delete + /// immediately. + /// + /// + /// Deprecated: please use the PropagationPolicy, this field will be deprecated + /// in 1.7. Should the dependent objects be orphaned. If true/false, the + /// "orphan" finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not both. + /// + /// + /// Whether and how garbage collection will be performed. Either this field or + /// OrphanDependents may be set, but not both. The default policy is decided by + /// the existing finalizer set in the metadata.finalizers and the + /// resource-specific default policy. + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteStorageClass1Async(this IKubernetes operations, V1DeleteOptions body, string name, int? gracePeriodSeconds = default(int?), bool? orphanDependents = default(bool?), string propagationPolicy = default(string), string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteStorageClass1WithHttpMessagesAsync(body, name, gracePeriodSeconds, orphanDependents, propagationPolicy, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// partially update the specified StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + public static V1beta1StorageClass PatchStorageClass1(this IKubernetes operations, object body, string name, string pretty = default(string)) + { + return operations.PatchStorageClass1Async(body, name, pretty).GetAwaiter().GetResult(); + } + + /// + /// partially update the specified StorageClass + /// + /// + /// The operations group for this extension method. + /// + /// + /// + /// + /// name of the StorageClass + /// + /// + /// If 'true', then the output is pretty printed. + /// + /// + /// The cancellation token. + /// + public static async Task PatchStorageClass1Async(this IKubernetes operations, object body, string name, string pretty = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.PatchStorageClass1WithHttpMessagesAsync(body, name, pretty, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// The operations group for this extension method. + /// + public static void LogFileListHandler(this IKubernetes operations) + { + operations.LogFileListHandlerAsync().GetAwaiter().GetResult(); + } + + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task LogFileListHandlerAsync(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.LogFileListHandlerWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// The operations group for this extension method. + /// + /// + /// path to the log + /// + public static void LogFileHandler(this IKubernetes operations, string logpath) + { + operations.LogFileHandlerAsync(logpath).GetAwaiter().GetResult(); + } + + /// + /// The operations group for this extension method. + /// + /// + /// path to the log + /// + /// + /// The cancellation token. + /// + public static async Task LogFileHandlerAsync(this IKubernetes operations, string logpath, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.LogFileHandlerWithHttpMessagesAsync(logpath, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// get the code version + /// + /// + /// The operations group for this extension method. + /// + public static VersionInfo GetCode(this IKubernetes operations) + { + return operations.GetCodeAsync().GetAwaiter().GetResult(); + } + + /// + /// get the code version + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetCodeAsync(this IKubernetes operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetCodeWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/generated/Models/Appsv1beta1Deployment.cs b/src/generated/Models/Appsv1beta1Deployment.cs new file mode 100755 index 000000000..471617fdf --- /dev/null +++ b/src/generated/Models/Appsv1beta1Deployment.cs @@ -0,0 +1,109 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Deployment enables declarative updates for Pods and ReplicaSets. + /// + public partial class Appsv1beta1Deployment + { + /// + /// Initializes a new instance of the Appsv1beta1Deployment class. + /// + public Appsv1beta1Deployment() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Appsv1beta1Deployment class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object metadata. + /// Specification of the desired behavior of the + /// Deployment. + /// Most recently observed status of the + /// Deployment. + public Appsv1beta1Deployment(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), Appsv1beta1DeploymentSpec spec = default(Appsv1beta1DeploymentSpec), Appsv1beta1DeploymentStatus status = default(Appsv1beta1DeploymentStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets specification of the desired behavior of the + /// Deployment. + /// + [JsonProperty(PropertyName = "spec")] + public Appsv1beta1DeploymentSpec Spec { get; set; } + + /// + /// Gets or sets most recently observed status of the Deployment. + /// + [JsonProperty(PropertyName = "status")] + public Appsv1beta1DeploymentStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/Appsv1beta1DeploymentCondition.cs b/src/generated/Models/Appsv1beta1DeploymentCondition.cs new file mode 100755 index 000000000..60f874c81 --- /dev/null +++ b/src/generated/Models/Appsv1beta1DeploymentCondition.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// DeploymentCondition describes the state of a deployment at a certain + /// point. + /// + public partial class Appsv1beta1DeploymentCondition + { + /// + /// Initializes a new instance of the Appsv1beta1DeploymentCondition + /// class. + /// + public Appsv1beta1DeploymentCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Appsv1beta1DeploymentCondition + /// class. + /// + /// Status of the condition, one of True, False, + /// Unknown. + /// Type of deployment condition. + /// Last time the condition + /// transitioned from one status to another. + /// The last time this condition was + /// updated. + /// A human readable message indicating details + /// about the transition. + /// The reason for the condition's last + /// transition. + public Appsv1beta1DeploymentCondition(string status, string type, System.DateTime? lastTransitionTime = default(System.DateTime?), System.DateTime? lastUpdateTime = default(System.DateTime?), string message = default(string), string reason = default(string)) + { + LastTransitionTime = lastTransitionTime; + LastUpdateTime = lastUpdateTime; + Message = message; + Reason = reason; + Status = status; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets last time the condition transitioned from one status + /// to another. + /// + [JsonProperty(PropertyName = "lastTransitionTime")] + public System.DateTime? LastTransitionTime { get; set; } + + /// + /// Gets or sets the last time this condition was updated. + /// + [JsonProperty(PropertyName = "lastUpdateTime")] + public System.DateTime? LastUpdateTime { get; set; } + + /// + /// Gets or sets a human readable message indicating details about the + /// transition. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets the reason for the condition's last transition. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets status of the condition, one of True, False, Unknown. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets type of deployment condition. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Status"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/src/generated/Models/Appsv1beta1DeploymentList.cs b/src/generated/Models/Appsv1beta1DeploymentList.cs new file mode 100755 index 000000000..b07d9045a --- /dev/null +++ b/src/generated/Models/Appsv1beta1DeploymentList.cs @@ -0,0 +1,111 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DeploymentList is a list of Deployments. + /// + public partial class Appsv1beta1DeploymentList + { + /// + /// Initializes a new instance of the Appsv1beta1DeploymentList class. + /// + public Appsv1beta1DeploymentList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Appsv1beta1DeploymentList class. + /// + /// Items is the list of Deployments. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. + public Appsv1beta1DeploymentList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is the list of Deployments. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/Appsv1beta1DeploymentRollback.cs b/src/generated/Models/Appsv1beta1DeploymentRollback.cs new file mode 100755 index 000000000..664bb4693 --- /dev/null +++ b/src/generated/Models/Appsv1beta1DeploymentRollback.cs @@ -0,0 +1,119 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DeploymentRollback stores the information required to rollback a + /// deployment. + /// + public partial class Appsv1beta1DeploymentRollback + { + /// + /// Initializes a new instance of the Appsv1beta1DeploymentRollback + /// class. + /// + public Appsv1beta1DeploymentRollback() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Appsv1beta1DeploymentRollback + /// class. + /// + /// Required: This must match the Name of a + /// deployment. + /// The config of this deployment + /// rollback. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// The annotations to be updated to a + /// deployment + public Appsv1beta1DeploymentRollback(string name, Appsv1beta1RollbackConfig rollbackTo, string apiVersion = default(string), string kind = default(string), IDictionary updatedAnnotations = default(IDictionary)) + { + ApiVersion = apiVersion; + Kind = kind; + Name = name; + RollbackTo = rollbackTo; + UpdatedAnnotations = updatedAnnotations; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets required: This must match the Name of a deployment. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the config of this deployment rollback. + /// + [JsonProperty(PropertyName = "rollbackTo")] + public Appsv1beta1RollbackConfig RollbackTo { get; set; } + + /// + /// Gets or sets the annotations to be updated to a deployment + /// + [JsonProperty(PropertyName = "updatedAnnotations")] + public IDictionary UpdatedAnnotations { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (RollbackTo == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RollbackTo"); + } + } + } +} diff --git a/src/generated/Models/Appsv1beta1DeploymentSpec.cs b/src/generated/Models/Appsv1beta1DeploymentSpec.cs new file mode 100755 index 000000000..0a6bb7b25 --- /dev/null +++ b/src/generated/Models/Appsv1beta1DeploymentSpec.cs @@ -0,0 +1,165 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// DeploymentSpec is the specification of the desired behavior of the + /// Deployment. + /// + public partial class Appsv1beta1DeploymentSpec + { + /// + /// Initializes a new instance of the Appsv1beta1DeploymentSpec class. + /// + public Appsv1beta1DeploymentSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Appsv1beta1DeploymentSpec class. + /// + /// Template describes the pods that will be + /// created. + /// Minimum number of seconds for which a + /// newly created pod should be ready without any of its container + /// crashing, for it to be considered available. Defaults to 0 (pod + /// will be considered available as soon as it is ready) + /// Indicates that the deployment is + /// paused. + /// The maximum time in seconds + /// for a deployment to make progress before it is considered to be + /// failed. The deployment controller will continue to process failed + /// deployments and a condition with a ProgressDeadlineExceeded reason + /// will be surfaced in the deployment status. Once autoRollback is + /// implemented, the deployment controller will automatically rollback + /// failed deployments. Note that progress will not be estimated during + /// the time a deployment is paused. Defaults to 600s. + /// Number of desired pods. This is a pointer to + /// distinguish between explicit zero and not specified. Defaults to + /// 1. + /// The number of old ReplicaSets to + /// retain to allow rollback. This is a pointer to distinguish between + /// explicit zero and not specified. Defaults to 2. + /// The config this deployment is rolling back + /// to. Will be cleared after rollback is done. + /// Label selector for pods. Existing + /// ReplicaSets whose pods are selected by this will be the ones + /// affected by this deployment. + /// The deployment strategy to use to replace + /// existing pods with new ones. + public Appsv1beta1DeploymentSpec(V1PodTemplateSpec template, int? minReadySeconds = default(int?), bool? paused = default(bool?), int? progressDeadlineSeconds = default(int?), int? replicas = default(int?), int? revisionHistoryLimit = default(int?), Appsv1beta1RollbackConfig rollbackTo = default(Appsv1beta1RollbackConfig), V1LabelSelector selector = default(V1LabelSelector), Appsv1beta1DeploymentStrategy strategy = default(Appsv1beta1DeploymentStrategy)) + { + MinReadySeconds = minReadySeconds; + Paused = paused; + ProgressDeadlineSeconds = progressDeadlineSeconds; + Replicas = replicas; + RevisionHistoryLimit = revisionHistoryLimit; + RollbackTo = rollbackTo; + Selector = selector; + Strategy = strategy; + Template = template; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets minimum number of seconds for which a newly created + /// pod should be ready without any of its container crashing, for it + /// to be considered available. Defaults to 0 (pod will be considered + /// available as soon as it is ready) + /// + [JsonProperty(PropertyName = "minReadySeconds")] + public int? MinReadySeconds { get; set; } + + /// + /// Gets or sets indicates that the deployment is paused. + /// + [JsonProperty(PropertyName = "paused")] + public bool? Paused { get; set; } + + /// + /// Gets or sets the maximum time in seconds for a deployment to make + /// progress before it is considered to be failed. The deployment + /// controller will continue to process failed deployments and a + /// condition with a ProgressDeadlineExceeded reason will be surfaced + /// in the deployment status. Once autoRollback is implemented, the + /// deployment controller will automatically rollback failed + /// deployments. Note that progress will not be estimated during the + /// time a deployment is paused. Defaults to 600s. + /// + [JsonProperty(PropertyName = "progressDeadlineSeconds")] + public int? ProgressDeadlineSeconds { get; set; } + + /// + /// Gets or sets number of desired pods. This is a pointer to + /// distinguish between explicit zero and not specified. Defaults to 1. + /// + [JsonProperty(PropertyName = "replicas")] + public int? Replicas { get; set; } + + /// + /// Gets or sets the number of old ReplicaSets to retain to allow + /// rollback. This is a pointer to distinguish between explicit zero + /// and not specified. Defaults to 2. + /// + [JsonProperty(PropertyName = "revisionHistoryLimit")] + public int? RevisionHistoryLimit { get; set; } + + /// + /// Gets or sets the config this deployment is rolling back to. Will be + /// cleared after rollback is done. + /// + [JsonProperty(PropertyName = "rollbackTo")] + public Appsv1beta1RollbackConfig RollbackTo { get; set; } + + /// + /// Gets or sets label selector for pods. Existing ReplicaSets whose + /// pods are selected by this will be the ones affected by this + /// deployment. + /// + [JsonProperty(PropertyName = "selector")] + public V1LabelSelector Selector { get; set; } + + /// + /// Gets or sets the deployment strategy to use to replace existing + /// pods with new ones. + /// + [JsonProperty(PropertyName = "strategy")] + public Appsv1beta1DeploymentStrategy Strategy { get; set; } + + /// + /// Gets or sets template describes the pods that will be created. + /// + [JsonProperty(PropertyName = "template")] + public V1PodTemplateSpec Template { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Template == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Template"); + } + if (Template != null) + { + Template.Validate(); + } + } + } +} diff --git a/src/generated/Models/Appsv1beta1DeploymentStatus.cs b/src/generated/Models/Appsv1beta1DeploymentStatus.cs new file mode 100755 index 000000000..1686982eb --- /dev/null +++ b/src/generated/Models/Appsv1beta1DeploymentStatus.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DeploymentStatus is the most recently observed status of the + /// Deployment. + /// + public partial class Appsv1beta1DeploymentStatus + { + /// + /// Initializes a new instance of the Appsv1beta1DeploymentStatus + /// class. + /// + public Appsv1beta1DeploymentStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Appsv1beta1DeploymentStatus + /// class. + /// + /// Total number of available pods + /// (ready for at least minReadySeconds) targeted by this + /// deployment. + /// Represents the latest available + /// observations of a deployment's current state. + /// The generation observed by the + /// deployment controller. + /// Total number of ready pods targeted by + /// this deployment. + /// Total number of non-terminated pods targeted + /// by this deployment (their labels match the selector). + /// Total number of unavailable pods + /// targeted by this deployment. + /// Total number of non-terminated pods + /// targeted by this deployment that have the desired template + /// spec. + public Appsv1beta1DeploymentStatus(int? availableReplicas = default(int?), IList conditions = default(IList), long? observedGeneration = default(long?), int? readyReplicas = default(int?), int? replicas = default(int?), int? unavailableReplicas = default(int?), int? updatedReplicas = default(int?)) + { + AvailableReplicas = availableReplicas; + Conditions = conditions; + ObservedGeneration = observedGeneration; + ReadyReplicas = readyReplicas; + Replicas = replicas; + UnavailableReplicas = unavailableReplicas; + UpdatedReplicas = updatedReplicas; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets total number of available pods (ready for at least + /// minReadySeconds) targeted by this deployment. + /// + [JsonProperty(PropertyName = "availableReplicas")] + public int? AvailableReplicas { get; set; } + + /// + /// Gets or sets represents the latest available observations of a + /// deployment's current state. + /// + [JsonProperty(PropertyName = "conditions")] + public IList Conditions { get; set; } + + /// + /// Gets or sets the generation observed by the deployment controller. + /// + [JsonProperty(PropertyName = "observedGeneration")] + public long? ObservedGeneration { get; set; } + + /// + /// Gets or sets total number of ready pods targeted by this + /// deployment. + /// + [JsonProperty(PropertyName = "readyReplicas")] + public int? ReadyReplicas { get; set; } + + /// + /// Gets or sets total number of non-terminated pods targeted by this + /// deployment (their labels match the selector). + /// + [JsonProperty(PropertyName = "replicas")] + public int? Replicas { get; set; } + + /// + /// Gets or sets total number of unavailable pods targeted by this + /// deployment. + /// + [JsonProperty(PropertyName = "unavailableReplicas")] + public int? UnavailableReplicas { get; set; } + + /// + /// Gets or sets total number of non-terminated pods targeted by this + /// deployment that have the desired template spec. + /// + [JsonProperty(PropertyName = "updatedReplicas")] + public int? UpdatedReplicas { get; set; } + + } +} diff --git a/src/generated/Models/Appsv1beta1DeploymentStrategy.cs b/src/generated/Models/Appsv1beta1DeploymentStrategy.cs new file mode 100755 index 000000000..fac9a71bd --- /dev/null +++ b/src/generated/Models/Appsv1beta1DeploymentStrategy.cs @@ -0,0 +1,60 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// DeploymentStrategy describes how to replace existing pods with new + /// ones. + /// + public partial class Appsv1beta1DeploymentStrategy + { + /// + /// Initializes a new instance of the Appsv1beta1DeploymentStrategy + /// class. + /// + public Appsv1beta1DeploymentStrategy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Appsv1beta1DeploymentStrategy + /// class. + /// + /// Rolling update config params. Present + /// only if DeploymentStrategyType = RollingUpdate. + /// Type of deployment. Can be "Recreate" or + /// "RollingUpdate". Default is RollingUpdate. + public Appsv1beta1DeploymentStrategy(Appsv1beta1RollingUpdateDeployment rollingUpdate = default(Appsv1beta1RollingUpdateDeployment), string type = default(string)) + { + RollingUpdate = rollingUpdate; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets rolling update config params. Present only if + /// DeploymentStrategyType = RollingUpdate. + /// + [JsonProperty(PropertyName = "rollingUpdate")] + public Appsv1beta1RollingUpdateDeployment RollingUpdate { get; set; } + + /// + /// Gets or sets type of deployment. Can be "Recreate" or + /// "RollingUpdate". Default is RollingUpdate. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + } +} diff --git a/src/generated/Models/Appsv1beta1RollbackConfig.cs b/src/generated/Models/Appsv1beta1RollbackConfig.cs new file mode 100755 index 000000000..5011da23b --- /dev/null +++ b/src/generated/Models/Appsv1beta1RollbackConfig.cs @@ -0,0 +1,44 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class Appsv1beta1RollbackConfig + { + /// + /// Initializes a new instance of the Appsv1beta1RollbackConfig class. + /// + public Appsv1beta1RollbackConfig() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Appsv1beta1RollbackConfig class. + /// + /// The revision to rollback to. If set to 0, + /// rollbck to the last revision. + public Appsv1beta1RollbackConfig(long? revision = default(long?)) + { + Revision = revision; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the revision to rollback to. If set to 0, rollbck to + /// the last revision. + /// + [JsonProperty(PropertyName = "revision")] + public long? Revision { get; set; } + + } +} diff --git a/src/generated/Models/Appsv1beta1RollingUpdateDeployment.cs b/src/generated/Models/Appsv1beta1RollingUpdateDeployment.cs new file mode 100755 index 000000000..68dc73356 --- /dev/null +++ b/src/generated/Models/Appsv1beta1RollingUpdateDeployment.cs @@ -0,0 +1,93 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Spec to control the desired behavior of rolling update. + /// + public partial class Appsv1beta1RollingUpdateDeployment + { + /// + /// Initializes a new instance of the + /// Appsv1beta1RollingUpdateDeployment class. + /// + public Appsv1beta1RollingUpdateDeployment() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// Appsv1beta1RollingUpdateDeployment class. + /// + /// The maximum number of pods that can be + /// scheduled above the desired number of pods. Value can be an + /// absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + /// This can not be 0 if MaxUnavailable is 0. Absolute number is + /// calculated from percentage by rounding up. Defaults to 25%. + /// Example: when this is set to 30%, the new RC can be scaled up + /// immediately when the rolling update starts, such that the total + /// number of old and new pods do not exceed 130% of desired pods. Once + /// old pods have been killed, new RC can be scaled up further, + /// ensuring that total number of pods running at any time during the + /// update is atmost 130% of desired pods. + /// The maximum number of pods that can be + /// unavailable during the update. Value can be an absolute number (ex: + /// 5) or a percentage of desired pods (ex: 10%). Absolute number is + /// calculated from percentage by rounding down. This can not be 0 if + /// MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, + /// the old RC can be scaled down to 70% of desired pods immediately + /// when the rolling update starts. Once new pods are ready, old RC can + /// be scaled down further, followed by scaling up the new RC, ensuring + /// that the total number of pods available at all times during the + /// update is at least 70% of desired pods. + public Appsv1beta1RollingUpdateDeployment(string maxSurge = default(string), string maxUnavailable = default(string)) + { + MaxSurge = maxSurge; + MaxUnavailable = maxUnavailable; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the maximum number of pods that can be scheduled above + /// the desired number of pods. Value can be an absolute number (ex: 5) + /// or a percentage of desired pods (ex: 10%). This can not be 0 if + /// MaxUnavailable is 0. Absolute number is calculated from percentage + /// by rounding up. Defaults to 25%. Example: when this is set to 30%, + /// the new RC can be scaled up immediately when the rolling update + /// starts, such that the total number of old and new pods do not + /// exceed 130% of desired pods. Once old pods have been killed, new RC + /// can be scaled up further, ensuring that total number of pods + /// running at any time during the update is atmost 130% of desired + /// pods. + /// + [JsonProperty(PropertyName = "maxSurge")] + public string MaxSurge { get; set; } + + /// + /// Gets or sets the maximum number of pods that can be unavailable + /// during the update. Value can be an absolute number (ex: 5) or a + /// percentage of desired pods (ex: 10%). Absolute number is calculated + /// from percentage by rounding down. This can not be 0 if MaxSurge is + /// 0. Defaults to 25%. Example: when this is set to 30%, the old RC + /// can be scaled down to 70% of desired pods immediately when the + /// rolling update starts. Once new pods are ready, old RC can be + /// scaled down further, followed by scaling up the new RC, ensuring + /// that the total number of pods available at all times during the + /// update is at least 70% of desired pods. + /// + [JsonProperty(PropertyName = "maxUnavailable")] + public string MaxUnavailable { get; set; } + + } +} diff --git a/src/generated/Models/Appsv1beta1Scale.cs b/src/generated/Models/Appsv1beta1Scale.cs new file mode 100755 index 000000000..49b8e8428 --- /dev/null +++ b/src/generated/Models/Appsv1beta1Scale.cs @@ -0,0 +1,114 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Scale represents a scaling request for a resource. + /// + public partial class Appsv1beta1Scale + { + /// + /// Initializes a new instance of the Appsv1beta1Scale class. + /// + public Appsv1beta1Scale() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Appsv1beta1Scale class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object metadata; More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. + /// defines the behavior of the scale. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// current status of the scale. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// Read-only. + public Appsv1beta1Scale(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), Appsv1beta1ScaleSpec spec = default(Appsv1beta1ScaleSpec), Appsv1beta1ScaleStatus status = default(Appsv1beta1ScaleStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object metadata; More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets defines the behavior of the scale. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// + [JsonProperty(PropertyName = "spec")] + public Appsv1beta1ScaleSpec Spec { get; set; } + + /// + /// Gets or sets current status of the scale. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// Read-only. + /// + [JsonProperty(PropertyName = "status")] + public Appsv1beta1ScaleStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/Appsv1beta1ScaleSpec.cs b/src/generated/Models/Appsv1beta1ScaleSpec.cs new file mode 100755 index 000000000..c27ea6f63 --- /dev/null +++ b/src/generated/Models/Appsv1beta1ScaleSpec.cs @@ -0,0 +1,46 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ScaleSpec describes the attributes of a scale subresource + /// + public partial class Appsv1beta1ScaleSpec + { + /// + /// Initializes a new instance of the Appsv1beta1ScaleSpec class. + /// + public Appsv1beta1ScaleSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Appsv1beta1ScaleSpec class. + /// + /// desired number of instances for the scaled + /// object. + public Appsv1beta1ScaleSpec(int? replicas = default(int?)) + { + Replicas = replicas; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets desired number of instances for the scaled object. + /// + [JsonProperty(PropertyName = "replicas")] + public int? Replicas { get; set; } + + } +} diff --git a/src/generated/Models/Appsv1beta1ScaleStatus.cs b/src/generated/Models/Appsv1beta1ScaleStatus.cs new file mode 100755 index 000000000..933d3f61d --- /dev/null +++ b/src/generated/Models/Appsv1beta1ScaleStatus.cs @@ -0,0 +1,92 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ScaleStatus represents the current status of a scale subresource. + /// + public partial class Appsv1beta1ScaleStatus + { + /// + /// Initializes a new instance of the Appsv1beta1ScaleStatus class. + /// + public Appsv1beta1ScaleStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Appsv1beta1ScaleStatus class. + /// + /// actual number of observed instances of the + /// scaled object. + /// label query over pods that should match the + /// replicas count. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// label selector for pods that should + /// match the replicas count. This is a serializated version of both + /// map-based and more expressive set-based selectors. This is done to + /// avoid introspection in the clients. The string will be in the same + /// format as the query-param syntax. If the target type only supports + /// map-based selectors, both this field and map-based selector field + /// are populated. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + public Appsv1beta1ScaleStatus(int replicas, IDictionary selector = default(IDictionary), string targetSelector = default(string)) + { + Replicas = replicas; + Selector = selector; + TargetSelector = targetSelector; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets actual number of observed instances of the scaled + /// object. + /// + [JsonProperty(PropertyName = "replicas")] + public int Replicas { get; set; } + + /// + /// Gets or sets label query over pods that should match the replicas + /// count. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// + [JsonProperty(PropertyName = "selector")] + public IDictionary Selector { get; set; } + + /// + /// Gets or sets label selector for pods that should match the replicas + /// count. This is a serializated version of both map-based and more + /// expressive set-based selectors. This is done to avoid introspection + /// in the clients. The string will be in the same format as the + /// query-param syntax. If the target type only supports map-based + /// selectors, both this field and map-based selector field are + /// populated. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// + [JsonProperty(PropertyName = "targetSelector")] + public string TargetSelector { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/generated/Models/Extensionsv1beta1Deployment.cs b/src/generated/Models/Extensionsv1beta1Deployment.cs new file mode 100755 index 000000000..c9394104f --- /dev/null +++ b/src/generated/Models/Extensionsv1beta1Deployment.cs @@ -0,0 +1,111 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Deployment enables declarative updates for Pods and ReplicaSets. + /// + public partial class Extensionsv1beta1Deployment + { + /// + /// Initializes a new instance of the Extensionsv1beta1Deployment + /// class. + /// + public Extensionsv1beta1Deployment() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Extensionsv1beta1Deployment + /// class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object metadata. + /// Specification of the desired behavior of the + /// Deployment. + /// Most recently observed status of the + /// Deployment. + public Extensionsv1beta1Deployment(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), Extensionsv1beta1DeploymentSpec spec = default(Extensionsv1beta1DeploymentSpec), Extensionsv1beta1DeploymentStatus status = default(Extensionsv1beta1DeploymentStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets specification of the desired behavior of the + /// Deployment. + /// + [JsonProperty(PropertyName = "spec")] + public Extensionsv1beta1DeploymentSpec Spec { get; set; } + + /// + /// Gets or sets most recently observed status of the Deployment. + /// + [JsonProperty(PropertyName = "status")] + public Extensionsv1beta1DeploymentStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/Extensionsv1beta1DeploymentCondition.cs b/src/generated/Models/Extensionsv1beta1DeploymentCondition.cs new file mode 100755 index 000000000..f5b3f40d4 --- /dev/null +++ b/src/generated/Models/Extensionsv1beta1DeploymentCondition.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// DeploymentCondition describes the state of a deployment at a certain + /// point. + /// + public partial class Extensionsv1beta1DeploymentCondition + { + /// + /// Initializes a new instance of the + /// Extensionsv1beta1DeploymentCondition class. + /// + public Extensionsv1beta1DeploymentCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// Extensionsv1beta1DeploymentCondition class. + /// + /// Status of the condition, one of True, False, + /// Unknown. + /// Type of deployment condition. + /// Last time the condition + /// transitioned from one status to another. + /// The last time this condition was + /// updated. + /// A human readable message indicating details + /// about the transition. + /// The reason for the condition's last + /// transition. + public Extensionsv1beta1DeploymentCondition(string status, string type, System.DateTime? lastTransitionTime = default(System.DateTime?), System.DateTime? lastUpdateTime = default(System.DateTime?), string message = default(string), string reason = default(string)) + { + LastTransitionTime = lastTransitionTime; + LastUpdateTime = lastUpdateTime; + Message = message; + Reason = reason; + Status = status; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets last time the condition transitioned from one status + /// to another. + /// + [JsonProperty(PropertyName = "lastTransitionTime")] + public System.DateTime? LastTransitionTime { get; set; } + + /// + /// Gets or sets the last time this condition was updated. + /// + [JsonProperty(PropertyName = "lastUpdateTime")] + public System.DateTime? LastUpdateTime { get; set; } + + /// + /// Gets or sets a human readable message indicating details about the + /// transition. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets the reason for the condition's last transition. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets status of the condition, one of True, False, Unknown. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets type of deployment condition. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Status"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/src/generated/Models/Extensionsv1beta1DeploymentList.cs b/src/generated/Models/Extensionsv1beta1DeploymentList.cs new file mode 100755 index 000000000..7acf0b685 --- /dev/null +++ b/src/generated/Models/Extensionsv1beta1DeploymentList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DeploymentList is a list of Deployments. + /// + public partial class Extensionsv1beta1DeploymentList + { + /// + /// Initializes a new instance of the Extensionsv1beta1DeploymentList + /// class. + /// + public Extensionsv1beta1DeploymentList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Extensionsv1beta1DeploymentList + /// class. + /// + /// Items is the list of Deployments. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. + public Extensionsv1beta1DeploymentList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is the list of Deployments. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/Extensionsv1beta1DeploymentRollback.cs b/src/generated/Models/Extensionsv1beta1DeploymentRollback.cs new file mode 100755 index 000000000..6ab15a9ce --- /dev/null +++ b/src/generated/Models/Extensionsv1beta1DeploymentRollback.cs @@ -0,0 +1,119 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DeploymentRollback stores the information required to rollback a + /// deployment. + /// + public partial class Extensionsv1beta1DeploymentRollback + { + /// + /// Initializes a new instance of the + /// Extensionsv1beta1DeploymentRollback class. + /// + public Extensionsv1beta1DeploymentRollback() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// Extensionsv1beta1DeploymentRollback class. + /// + /// Required: This must match the Name of a + /// deployment. + /// The config of this deployment + /// rollback. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// The annotations to be updated to a + /// deployment + public Extensionsv1beta1DeploymentRollback(string name, Extensionsv1beta1RollbackConfig rollbackTo, string apiVersion = default(string), string kind = default(string), IDictionary updatedAnnotations = default(IDictionary)) + { + ApiVersion = apiVersion; + Kind = kind; + Name = name; + RollbackTo = rollbackTo; + UpdatedAnnotations = updatedAnnotations; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets required: This must match the Name of a deployment. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the config of this deployment rollback. + /// + [JsonProperty(PropertyName = "rollbackTo")] + public Extensionsv1beta1RollbackConfig RollbackTo { get; set; } + + /// + /// Gets or sets the annotations to be updated to a deployment + /// + [JsonProperty(PropertyName = "updatedAnnotations")] + public IDictionary UpdatedAnnotations { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (RollbackTo == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RollbackTo"); + } + } + } +} diff --git a/src/generated/Models/Extensionsv1beta1DeploymentSpec.cs b/src/generated/Models/Extensionsv1beta1DeploymentSpec.cs new file mode 100755 index 000000000..71d2c6f5d --- /dev/null +++ b/src/generated/Models/Extensionsv1beta1DeploymentSpec.cs @@ -0,0 +1,169 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// DeploymentSpec is the specification of the desired behavior of the + /// Deployment. + /// + public partial class Extensionsv1beta1DeploymentSpec + { + /// + /// Initializes a new instance of the Extensionsv1beta1DeploymentSpec + /// class. + /// + public Extensionsv1beta1DeploymentSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Extensionsv1beta1DeploymentSpec + /// class. + /// + /// Template describes the pods that will be + /// created. + /// Minimum number of seconds for which a + /// newly created pod should be ready without any of its container + /// crashing, for it to be considered available. Defaults to 0 (pod + /// will be considered available as soon as it is ready) + /// Indicates that the deployment is paused and + /// will not be processed by the deployment controller. + /// The maximum time in seconds + /// for a deployment to make progress before it is considered to be + /// failed. The deployment controller will continue to process failed + /// deployments and a condition with a ProgressDeadlineExceeded reason + /// will be surfaced in the deployment status. Once autoRollback is + /// implemented, the deployment controller will automatically rollback + /// failed deployments. Note that progress will not be estimated during + /// the time a deployment is paused. This is not set by + /// default. + /// Number of desired pods. This is a pointer to + /// distinguish between explicit zero and not specified. Defaults to + /// 1. + /// The number of old ReplicaSets to + /// retain to allow rollback. This is a pointer to distinguish between + /// explicit zero and not specified. + /// The config this deployment is rolling back + /// to. Will be cleared after rollback is done. + /// Label selector for pods. Existing + /// ReplicaSets whose pods are selected by this will be the ones + /// affected by this deployment. + /// The deployment strategy to use to replace + /// existing pods with new ones. + public Extensionsv1beta1DeploymentSpec(V1PodTemplateSpec template, int? minReadySeconds = default(int?), bool? paused = default(bool?), int? progressDeadlineSeconds = default(int?), int? replicas = default(int?), int? revisionHistoryLimit = default(int?), Extensionsv1beta1RollbackConfig rollbackTo = default(Extensionsv1beta1RollbackConfig), V1LabelSelector selector = default(V1LabelSelector), Extensionsv1beta1DeploymentStrategy strategy = default(Extensionsv1beta1DeploymentStrategy)) + { + MinReadySeconds = minReadySeconds; + Paused = paused; + ProgressDeadlineSeconds = progressDeadlineSeconds; + Replicas = replicas; + RevisionHistoryLimit = revisionHistoryLimit; + RollbackTo = rollbackTo; + Selector = selector; + Strategy = strategy; + Template = template; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets minimum number of seconds for which a newly created + /// pod should be ready without any of its container crashing, for it + /// to be considered available. Defaults to 0 (pod will be considered + /// available as soon as it is ready) + /// + [JsonProperty(PropertyName = "minReadySeconds")] + public int? MinReadySeconds { get; set; } + + /// + /// Gets or sets indicates that the deployment is paused and will not + /// be processed by the deployment controller. + /// + [JsonProperty(PropertyName = "paused")] + public bool? Paused { get; set; } + + /// + /// Gets or sets the maximum time in seconds for a deployment to make + /// progress before it is considered to be failed. The deployment + /// controller will continue to process failed deployments and a + /// condition with a ProgressDeadlineExceeded reason will be surfaced + /// in the deployment status. Once autoRollback is implemented, the + /// deployment controller will automatically rollback failed + /// deployments. Note that progress will not be estimated during the + /// time a deployment is paused. This is not set by default. + /// + [JsonProperty(PropertyName = "progressDeadlineSeconds")] + public int? ProgressDeadlineSeconds { get; set; } + + /// + /// Gets or sets number of desired pods. This is a pointer to + /// distinguish between explicit zero and not specified. Defaults to 1. + /// + [JsonProperty(PropertyName = "replicas")] + public int? Replicas { get; set; } + + /// + /// Gets or sets the number of old ReplicaSets to retain to allow + /// rollback. This is a pointer to distinguish between explicit zero + /// and not specified. + /// + [JsonProperty(PropertyName = "revisionHistoryLimit")] + public int? RevisionHistoryLimit { get; set; } + + /// + /// Gets or sets the config this deployment is rolling back to. Will be + /// cleared after rollback is done. + /// + [JsonProperty(PropertyName = "rollbackTo")] + public Extensionsv1beta1RollbackConfig RollbackTo { get; set; } + + /// + /// Gets or sets label selector for pods. Existing ReplicaSets whose + /// pods are selected by this will be the ones affected by this + /// deployment. + /// + [JsonProperty(PropertyName = "selector")] + public V1LabelSelector Selector { get; set; } + + /// + /// Gets or sets the deployment strategy to use to replace existing + /// pods with new ones. + /// + [JsonProperty(PropertyName = "strategy")] + public Extensionsv1beta1DeploymentStrategy Strategy { get; set; } + + /// + /// Gets or sets template describes the pods that will be created. + /// + [JsonProperty(PropertyName = "template")] + public V1PodTemplateSpec Template { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Template == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Template"); + } + if (Template != null) + { + Template.Validate(); + } + } + } +} diff --git a/src/generated/Models/Extensionsv1beta1DeploymentStatus.cs b/src/generated/Models/Extensionsv1beta1DeploymentStatus.cs new file mode 100755 index 000000000..91625b0f9 --- /dev/null +++ b/src/generated/Models/Extensionsv1beta1DeploymentStatus.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DeploymentStatus is the most recently observed status of the + /// Deployment. + /// + public partial class Extensionsv1beta1DeploymentStatus + { + /// + /// Initializes a new instance of the Extensionsv1beta1DeploymentStatus + /// class. + /// + public Extensionsv1beta1DeploymentStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Extensionsv1beta1DeploymentStatus + /// class. + /// + /// Total number of available pods + /// (ready for at least minReadySeconds) targeted by this + /// deployment. + /// Represents the latest available + /// observations of a deployment's current state. + /// The generation observed by the + /// deployment controller. + /// Total number of ready pods targeted by + /// this deployment. + /// Total number of non-terminated pods targeted + /// by this deployment (their labels match the selector). + /// Total number of unavailable pods + /// targeted by this deployment. + /// Total number of non-terminated pods + /// targeted by this deployment that have the desired template + /// spec. + public Extensionsv1beta1DeploymentStatus(int? availableReplicas = default(int?), IList conditions = default(IList), long? observedGeneration = default(long?), int? readyReplicas = default(int?), int? replicas = default(int?), int? unavailableReplicas = default(int?), int? updatedReplicas = default(int?)) + { + AvailableReplicas = availableReplicas; + Conditions = conditions; + ObservedGeneration = observedGeneration; + ReadyReplicas = readyReplicas; + Replicas = replicas; + UnavailableReplicas = unavailableReplicas; + UpdatedReplicas = updatedReplicas; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets total number of available pods (ready for at least + /// minReadySeconds) targeted by this deployment. + /// + [JsonProperty(PropertyName = "availableReplicas")] + public int? AvailableReplicas { get; set; } + + /// + /// Gets or sets represents the latest available observations of a + /// deployment's current state. + /// + [JsonProperty(PropertyName = "conditions")] + public IList Conditions { get; set; } + + /// + /// Gets or sets the generation observed by the deployment controller. + /// + [JsonProperty(PropertyName = "observedGeneration")] + public long? ObservedGeneration { get; set; } + + /// + /// Gets or sets total number of ready pods targeted by this + /// deployment. + /// + [JsonProperty(PropertyName = "readyReplicas")] + public int? ReadyReplicas { get; set; } + + /// + /// Gets or sets total number of non-terminated pods targeted by this + /// deployment (their labels match the selector). + /// + [JsonProperty(PropertyName = "replicas")] + public int? Replicas { get; set; } + + /// + /// Gets or sets total number of unavailable pods targeted by this + /// deployment. + /// + [JsonProperty(PropertyName = "unavailableReplicas")] + public int? UnavailableReplicas { get; set; } + + /// + /// Gets or sets total number of non-terminated pods targeted by this + /// deployment that have the desired template spec. + /// + [JsonProperty(PropertyName = "updatedReplicas")] + public int? UpdatedReplicas { get; set; } + + } +} diff --git a/src/generated/Models/Extensionsv1beta1DeploymentStrategy.cs b/src/generated/Models/Extensionsv1beta1DeploymentStrategy.cs new file mode 100755 index 000000000..49318190b --- /dev/null +++ b/src/generated/Models/Extensionsv1beta1DeploymentStrategy.cs @@ -0,0 +1,60 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// DeploymentStrategy describes how to replace existing pods with new + /// ones. + /// + public partial class Extensionsv1beta1DeploymentStrategy + { + /// + /// Initializes a new instance of the + /// Extensionsv1beta1DeploymentStrategy class. + /// + public Extensionsv1beta1DeploymentStrategy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// Extensionsv1beta1DeploymentStrategy class. + /// + /// Rolling update config params. Present + /// only if DeploymentStrategyType = RollingUpdate. + /// Type of deployment. Can be "Recreate" or + /// "RollingUpdate". Default is RollingUpdate. + public Extensionsv1beta1DeploymentStrategy(Extensionsv1beta1RollingUpdateDeployment rollingUpdate = default(Extensionsv1beta1RollingUpdateDeployment), string type = default(string)) + { + RollingUpdate = rollingUpdate; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets rolling update config params. Present only if + /// DeploymentStrategyType = RollingUpdate. + /// + [JsonProperty(PropertyName = "rollingUpdate")] + public Extensionsv1beta1RollingUpdateDeployment RollingUpdate { get; set; } + + /// + /// Gets or sets type of deployment. Can be "Recreate" or + /// "RollingUpdate". Default is RollingUpdate. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + } +} diff --git a/src/generated/Models/Extensionsv1beta1RollbackConfig.cs b/src/generated/Models/Extensionsv1beta1RollbackConfig.cs new file mode 100755 index 000000000..ce452ef3a --- /dev/null +++ b/src/generated/Models/Extensionsv1beta1RollbackConfig.cs @@ -0,0 +1,46 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class Extensionsv1beta1RollbackConfig + { + /// + /// Initializes a new instance of the Extensionsv1beta1RollbackConfig + /// class. + /// + public Extensionsv1beta1RollbackConfig() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Extensionsv1beta1RollbackConfig + /// class. + /// + /// The revision to rollback to. If set to 0, + /// rollbck to the last revision. + public Extensionsv1beta1RollbackConfig(long? revision = default(long?)) + { + Revision = revision; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the revision to rollback to. If set to 0, rollbck to + /// the last revision. + /// + [JsonProperty(PropertyName = "revision")] + public long? Revision { get; set; } + + } +} diff --git a/src/generated/Models/Extensionsv1beta1RollingUpdateDeployment.cs b/src/generated/Models/Extensionsv1beta1RollingUpdateDeployment.cs new file mode 100755 index 000000000..27a3a615f --- /dev/null +++ b/src/generated/Models/Extensionsv1beta1RollingUpdateDeployment.cs @@ -0,0 +1,94 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Spec to control the desired behavior of rolling update. + /// + public partial class Extensionsv1beta1RollingUpdateDeployment + { + /// + /// Initializes a new instance of the + /// Extensionsv1beta1RollingUpdateDeployment class. + /// + public Extensionsv1beta1RollingUpdateDeployment() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// Extensionsv1beta1RollingUpdateDeployment class. + /// + /// The maximum number of pods that can be + /// scheduled above the desired number of pods. Value can be an + /// absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + /// This can not be 0 if MaxUnavailable is 0. Absolute number is + /// calculated from percentage by rounding up. By default, a value of 1 + /// is used. Example: when this is set to 30%, the new RC can be scaled + /// up immediately when the rolling update starts, such that the total + /// number of old and new pods do not exceed 130% of desired pods. Once + /// old pods have been killed, new RC can be scaled up further, + /// ensuring that total number of pods running at any time during the + /// update is atmost 130% of desired pods. + /// The maximum number of pods that can be + /// unavailable during the update. Value can be an absolute number (ex: + /// 5) or a percentage of desired pods (ex: 10%). Absolute number is + /// calculated from percentage by rounding down. This can not be 0 if + /// MaxSurge is 0. By default, a fixed value of 1 is used. Example: + /// when this is set to 30%, the old RC can be scaled down to 70% of + /// desired pods immediately when the rolling update starts. Once new + /// pods are ready, old RC can be scaled down further, followed by + /// scaling up the new RC, ensuring that the total number of pods + /// available at all times during the update is at least 70% of desired + /// pods. + public Extensionsv1beta1RollingUpdateDeployment(string maxSurge = default(string), string maxUnavailable = default(string)) + { + MaxSurge = maxSurge; + MaxUnavailable = maxUnavailable; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the maximum number of pods that can be scheduled above + /// the desired number of pods. Value can be an absolute number (ex: 5) + /// or a percentage of desired pods (ex: 10%). This can not be 0 if + /// MaxUnavailable is 0. Absolute number is calculated from percentage + /// by rounding up. By default, a value of 1 is used. Example: when + /// this is set to 30%, the new RC can be scaled up immediately when + /// the rolling update starts, such that the total number of old and + /// new pods do not exceed 130% of desired pods. Once old pods have + /// been killed, new RC can be scaled up further, ensuring that total + /// number of pods running at any time during the update is atmost 130% + /// of desired pods. + /// + [JsonProperty(PropertyName = "maxSurge")] + public string MaxSurge { get; set; } + + /// + /// Gets or sets the maximum number of pods that can be unavailable + /// during the update. Value can be an absolute number (ex: 5) or a + /// percentage of desired pods (ex: 10%). Absolute number is calculated + /// from percentage by rounding down. This can not be 0 if MaxSurge is + /// 0. By default, a fixed value of 1 is used. Example: when this is + /// set to 30%, the old RC can be scaled down to 70% of desired pods + /// immediately when the rolling update starts. Once new pods are + /// ready, old RC can be scaled down further, followed by scaling up + /// the new RC, ensuring that the total number of pods available at all + /// times during the update is at least 70% of desired pods. + /// + [JsonProperty(PropertyName = "maxUnavailable")] + public string MaxUnavailable { get; set; } + + } +} diff --git a/src/generated/Models/Extensionsv1beta1Scale.cs b/src/generated/Models/Extensionsv1beta1Scale.cs new file mode 100755 index 000000000..a1a1d9c2e --- /dev/null +++ b/src/generated/Models/Extensionsv1beta1Scale.cs @@ -0,0 +1,114 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// represents a scaling request for a resource. + /// + public partial class Extensionsv1beta1Scale + { + /// + /// Initializes a new instance of the Extensionsv1beta1Scale class. + /// + public Extensionsv1beta1Scale() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Extensionsv1beta1Scale class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object metadata; More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. + /// defines the behavior of the scale. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// current status of the scale. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// Read-only. + public Extensionsv1beta1Scale(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), Extensionsv1beta1ScaleSpec spec = default(Extensionsv1beta1ScaleSpec), Extensionsv1beta1ScaleStatus status = default(Extensionsv1beta1ScaleStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object metadata; More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets defines the behavior of the scale. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// + [JsonProperty(PropertyName = "spec")] + public Extensionsv1beta1ScaleSpec Spec { get; set; } + + /// + /// Gets or sets current status of the scale. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// Read-only. + /// + [JsonProperty(PropertyName = "status")] + public Extensionsv1beta1ScaleStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/Extensionsv1beta1ScaleSpec.cs b/src/generated/Models/Extensionsv1beta1ScaleSpec.cs new file mode 100755 index 000000000..83eac9bb7 --- /dev/null +++ b/src/generated/Models/Extensionsv1beta1ScaleSpec.cs @@ -0,0 +1,46 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// describes the attributes of a scale subresource + /// + public partial class Extensionsv1beta1ScaleSpec + { + /// + /// Initializes a new instance of the Extensionsv1beta1ScaleSpec class. + /// + public Extensionsv1beta1ScaleSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Extensionsv1beta1ScaleSpec class. + /// + /// desired number of instances for the scaled + /// object. + public Extensionsv1beta1ScaleSpec(int? replicas = default(int?)) + { + Replicas = replicas; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets desired number of instances for the scaled object. + /// + [JsonProperty(PropertyName = "replicas")] + public int? Replicas { get; set; } + + } +} diff --git a/src/generated/Models/Extensionsv1beta1ScaleStatus.cs b/src/generated/Models/Extensionsv1beta1ScaleStatus.cs new file mode 100755 index 000000000..dd811f98b --- /dev/null +++ b/src/generated/Models/Extensionsv1beta1ScaleStatus.cs @@ -0,0 +1,94 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// represents the current status of a scale subresource. + /// + public partial class Extensionsv1beta1ScaleStatus + { + /// + /// Initializes a new instance of the Extensionsv1beta1ScaleStatus + /// class. + /// + public Extensionsv1beta1ScaleStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Extensionsv1beta1ScaleStatus + /// class. + /// + /// actual number of observed instances of the + /// scaled object. + /// label query over pods that should match the + /// replicas count. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// label selector for pods that should + /// match the replicas count. This is a serializated version of both + /// map-based and more expressive set-based selectors. This is done to + /// avoid introspection in the clients. The string will be in the same + /// format as the query-param syntax. If the target type only supports + /// map-based selectors, both this field and map-based selector field + /// are populated. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + public Extensionsv1beta1ScaleStatus(int replicas, IDictionary selector = default(IDictionary), string targetSelector = default(string)) + { + Replicas = replicas; + Selector = selector; + TargetSelector = targetSelector; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets actual number of observed instances of the scaled + /// object. + /// + [JsonProperty(PropertyName = "replicas")] + public int Replicas { get; set; } + + /// + /// Gets or sets label query over pods that should match the replicas + /// count. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// + [JsonProperty(PropertyName = "selector")] + public IDictionary Selector { get; set; } + + /// + /// Gets or sets label selector for pods that should match the replicas + /// count. This is a serializated version of both map-based and more + /// expressive set-based selectors. This is done to avoid introspection + /// in the clients. The string will be in the same format as the + /// query-param syntax. If the target type only supports map-based + /// selectors, both this field and map-based selector field are + /// populated. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// + [JsonProperty(PropertyName = "targetSelector")] + public string TargetSelector { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/src/generated/Models/RuntimeRawExtension.cs b/src/generated/Models/RuntimeRawExtension.cs new file mode 100755 index 000000000..5fbe7392b --- /dev/null +++ b/src/generated/Models/RuntimeRawExtension.cs @@ -0,0 +1,96 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// RawExtension is used to hold extensions in external versions. + /// + /// To use this, make a field which has RawExtension as its type in your + /// external, versioned struct, and Object in your internal struct. You + /// also need to register your various plugin types. + /// + /// // Internal package: type MyAPIObject struct { + /// runtime.TypeMeta `json:",inline"` + /// MyPlugin runtime.Object `json:"myPlugin"` + /// } type PluginA struct { + /// AOption string `json:"aOption"` + /// } + /// + /// // External package: type MyAPIObject struct { + /// runtime.TypeMeta `json:",inline"` + /// MyPlugin runtime.RawExtension `json:"myPlugin"` + /// } type PluginA struct { + /// AOption string `json:"aOption"` + /// } + /// + /// // On the wire, the JSON will look something like this: { + /// "kind":"MyAPIObject", + /// "apiVersion":"v1", + /// "myPlugin": { + /// "kind":"PluginA", + /// "aOption":"foo", + /// }, + /// } + /// + /// So what happens? Decode first uses json or yaml to unmarshal the + /// serialized data into your external MyAPIObject. That causes the raw + /// JSON to be stored, but not unpacked. The next step is to copy (using + /// pkg/conversion) into the internal struct. The runtime package's + /// DefaultScheme has conversion functions installed which will unpack the + /// JSON stored in RawExtension, turning it into the correct object type, + /// and storing it in the Object. (TODO: In the case where the object is of + /// an unknown type, a runtime.Unknown object will be created and stored.) + /// + public partial class RuntimeRawExtension + { + /// + /// Initializes a new instance of the RuntimeRawExtension class. + /// + public RuntimeRawExtension() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RuntimeRawExtension class. + /// + /// Raw is the underlying serialization of this + /// object. + public RuntimeRawExtension(byte[] raw) + { + Raw = raw; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets raw is the underlying serialization of this object. + /// + [JsonProperty(PropertyName = "Raw")] + public byte[] Raw { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Raw == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Raw"); + } + } + } +} diff --git a/src/generated/Models/V1APIGroup.cs b/src/generated/Models/V1APIGroup.cs new file mode 100755 index 000000000..b7542b793 --- /dev/null +++ b/src/generated/Models/V1APIGroup.cs @@ -0,0 +1,173 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// APIGroup contains the name, the supported versions, and the preferred + /// version of a group. + /// + public partial class V1APIGroup + { + /// + /// Initializes a new instance of the V1APIGroup class. + /// + public V1APIGroup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1APIGroup class. + /// + /// name is the name of the group. + /// a map of client CIDR to + /// server address that is serving this group. This is to help clients + /// reach servers in the most network-efficient way possible. Clients + /// can use the appropriate server address as per the CIDR that they + /// match. In case of multiple matches, clients should use the longest + /// matching CIDR. The server returns only those CIDRs that it thinks + /// that the client can match. For example: the master will return an + /// internal IP CIDR only, if the client reaches the server using an + /// internal IP. Server looks at X-Forwarded-For header or X-Real-Ip + /// header or request.RemoteAddr (in that order) to get the client + /// IP. + /// versions are the versions supported in this + /// group. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// preferredVersion is the version + /// preferred by the API server, which probably is the storage + /// version. + public V1APIGroup(string name, IList serverAddressByClientCIDRs, IList versions, string apiVersion = default(string), string kind = default(string), V1GroupVersionForDiscovery preferredVersion = default(V1GroupVersionForDiscovery)) + { + ApiVersion = apiVersion; + Kind = kind; + Name = name; + PreferredVersion = preferredVersion; + ServerAddressByClientCIDRs = serverAddressByClientCIDRs; + Versions = versions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets name is the name of the group. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets preferredVersion is the version preferred by the API + /// server, which probably is the storage version. + /// + [JsonProperty(PropertyName = "preferredVersion")] + public V1GroupVersionForDiscovery PreferredVersion { get; set; } + + /// + /// Gets or sets a map of client CIDR to server address that is serving + /// this group. This is to help clients reach servers in the most + /// network-efficient way possible. Clients can use the appropriate + /// server address as per the CIDR that they match. In case of multiple + /// matches, clients should use the longest matching CIDR. The server + /// returns only those CIDRs that it thinks that the client can match. + /// For example: the master will return an internal IP CIDR only, if + /// the client reaches the server using an internal IP. Server looks at + /// X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr + /// (in that order) to get the client IP. + /// + [JsonProperty(PropertyName = "serverAddressByClientCIDRs")] + public IList ServerAddressByClientCIDRs { get; set; } + + /// + /// Gets or sets versions are the versions supported in this group. + /// + [JsonProperty(PropertyName = "versions")] + public IList Versions { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (ServerAddressByClientCIDRs == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServerAddressByClientCIDRs"); + } + if (Versions == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Versions"); + } + if (PreferredVersion != null) + { + PreferredVersion.Validate(); + } + if (ServerAddressByClientCIDRs != null) + { + foreach (var element in ServerAddressByClientCIDRs) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Versions != null) + { + foreach (var element1 in Versions) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1APIGroupList.cs b/src/generated/Models/V1APIGroupList.cs new file mode 100755 index 000000000..51ac03535 --- /dev/null +++ b/src/generated/Models/V1APIGroupList.cs @@ -0,0 +1,104 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// APIGroupList is a list of APIGroup, to allow clients to discover the + /// API at /apis. + /// + public partial class V1APIGroupList + { + /// + /// Initializes a new instance of the V1APIGroupList class. + /// + public V1APIGroupList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1APIGroupList class. + /// + /// groups is a list of APIGroup. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1APIGroupList(IList groups, string apiVersion = default(string), string kind = default(string)) + { + ApiVersion = apiVersion; + Groups = groups; + Kind = kind; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets groups is a list of APIGroup. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Groups == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Groups"); + } + if (Groups != null) + { + foreach (var element in Groups) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1APIResource.cs b/src/generated/Models/V1APIResource.cs new file mode 100755 index 000000000..0eaf46a21 --- /dev/null +++ b/src/generated/Models/V1APIResource.cs @@ -0,0 +1,112 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// APIResource specifies the name of a resource and whether it is + /// namespaced. + /// + public partial class V1APIResource + { + /// + /// Initializes a new instance of the V1APIResource class. + /// + public V1APIResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1APIResource class. + /// + /// kind is the kind for the resource (e.g. 'Foo' is + /// the kind for a resource 'foo') + /// name is the name of the resource. + /// namespaced indicates if a resource is + /// namespaced or not. + /// verbs is a list of supported kube verbs (this + /// includes get, list, watch, create, update, patch, delete, + /// deletecollection, and proxy) + /// shortNames is a list of suggested short + /// names of the resource. + public V1APIResource(string kind, string name, bool namespaced, IList verbs, IList shortNames = default(IList)) + { + Kind = kind; + Name = name; + Namespaced = namespaced; + ShortNames = shortNames; + Verbs = verbs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets kind is the kind for the resource (e.g. 'Foo' is the + /// kind for a resource 'foo') + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets name is the name of the resource. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets namespaced indicates if a resource is namespaced or + /// not. + /// + [JsonProperty(PropertyName = "namespaced")] + public bool Namespaced { get; set; } + + /// + /// Gets or sets shortNames is a list of suggested short names of the + /// resource. + /// + [JsonProperty(PropertyName = "shortNames")] + public IList ShortNames { get; set; } + + /// + /// Gets or sets verbs is a list of supported kube verbs (this includes + /// get, list, watch, create, update, patch, delete, deletecollection, + /// and proxy) + /// + [JsonProperty(PropertyName = "verbs")] + public IList Verbs { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Kind == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (Verbs == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Verbs"); + } + } + } +} diff --git a/src/generated/Models/V1APIResourceList.cs b/src/generated/Models/V1APIResourceList.cs new file mode 100755 index 000000000..a0db3ea26 --- /dev/null +++ b/src/generated/Models/V1APIResourceList.cs @@ -0,0 +1,121 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// APIResourceList is a list of APIResource, it is used to expose the name + /// of the resources supported in a specific group and version, and if the + /// resource is namespaced. + /// + public partial class V1APIResourceList + { + /// + /// Initializes a new instance of the V1APIResourceList class. + /// + public V1APIResourceList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1APIResourceList class. + /// + /// groupVersion is the group and version + /// this APIResourceList is for. + /// resources contains the name of the + /// resources and if they are namespaced. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1APIResourceList(string groupVersion, IList resources, string apiVersion = default(string), string kind = default(string)) + { + ApiVersion = apiVersion; + GroupVersion = groupVersion; + Kind = kind; + Resources = resources; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets groupVersion is the group and version this + /// APIResourceList is for. + /// + [JsonProperty(PropertyName = "groupVersion")] + public string GroupVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets resources contains the name of the resources and if + /// they are namespaced. + /// + [JsonProperty(PropertyName = "resources")] + public IList Resources { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (GroupVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "GroupVersion"); + } + if (Resources == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Resources"); + } + if (Resources != null) + { + foreach (var element in Resources) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1APIVersions.cs b/src/generated/Models/V1APIVersions.cs new file mode 100755 index 000000000..cc74d794f --- /dev/null +++ b/src/generated/Models/V1APIVersions.cs @@ -0,0 +1,136 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// APIVersions lists the versions that are available, to allow clients to + /// discover the API at /api, which is the root path of the legacy v1 API. + /// + public partial class V1APIVersions + { + /// + /// Initializes a new instance of the V1APIVersions class. + /// + public V1APIVersions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1APIVersions class. + /// + /// a map of client CIDR to + /// server address that is serving this group. This is to help clients + /// reach servers in the most network-efficient way possible. Clients + /// can use the appropriate server address as per the CIDR that they + /// match. In case of multiple matches, clients should use the longest + /// matching CIDR. The server returns only those CIDRs that it thinks + /// that the client can match. For example: the master will return an + /// internal IP CIDR only, if the client reaches the server using an + /// internal IP. Server looks at X-Forwarded-For header or X-Real-Ip + /// header or request.RemoteAddr (in that order) to get the client + /// IP. + /// versions are the api versions that are + /// available. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1APIVersions(IList serverAddressByClientCIDRs, IList versions, string apiVersion = default(string), string kind = default(string)) + { + ApiVersion = apiVersion; + Kind = kind; + ServerAddressByClientCIDRs = serverAddressByClientCIDRs; + Versions = versions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets a map of client CIDR to server address that is serving + /// this group. This is to help clients reach servers in the most + /// network-efficient way possible. Clients can use the appropriate + /// server address as per the CIDR that they match. In case of multiple + /// matches, clients should use the longest matching CIDR. The server + /// returns only those CIDRs that it thinks that the client can match. + /// For example: the master will return an internal IP CIDR only, if + /// the client reaches the server using an internal IP. Server looks at + /// X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr + /// (in that order) to get the client IP. + /// + [JsonProperty(PropertyName = "serverAddressByClientCIDRs")] + public IList ServerAddressByClientCIDRs { get; set; } + + /// + /// Gets or sets versions are the api versions that are available. + /// + [JsonProperty(PropertyName = "versions")] + public IList Versions { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ServerAddressByClientCIDRs == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServerAddressByClientCIDRs"); + } + if (Versions == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Versions"); + } + if (ServerAddressByClientCIDRs != null) + { + foreach (var element in ServerAddressByClientCIDRs) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1AWSElasticBlockStoreVolumeSource.cs b/src/generated/Models/V1AWSElasticBlockStoreVolumeSource.cs new file mode 100755 index 000000000..d3b4bce54 --- /dev/null +++ b/src/generated/Models/V1AWSElasticBlockStoreVolumeSource.cs @@ -0,0 +1,116 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a Persistent Disk resource in AWS. + /// + /// An AWS EBS disk must exist before mounting to a container. The disk + /// must also be in the same AWS zone as the kubelet. An AWS EBS disk can + /// only be mounted as read/write once. AWS EBS volumes support ownership + /// management and SELinux relabeling. + /// + public partial class V1AWSElasticBlockStoreVolumeSource + { + /// + /// Initializes a new instance of the + /// V1AWSElasticBlockStoreVolumeSource class. + /// + public V1AWSElasticBlockStoreVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V1AWSElasticBlockStoreVolumeSource class. + /// + /// Unique ID of the persistent disk resource in + /// AWS (Amazon EBS volume). More info: + /// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + /// Filesystem type of the volume that you want to + /// mount. Tip: Ensure that the filesystem type is supported by the + /// host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly + /// inferred to be "ext4" if unspecified. More info: + /// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + /// The partition in the volume that you want + /// to mount. If omitted, the default is to mount by volume name. + /// Examples: For volume /dev/sda1, you specify the partition as "1". + /// Similarly, the volume partition for /dev/sda is "0" (or you can + /// leave the property empty). + /// Specify "true" to force and set the + /// ReadOnly property in VolumeMounts to "true". If omitted, the + /// default is "false". More info: + /// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + public V1AWSElasticBlockStoreVolumeSource(string volumeID, string fsType = default(string), int? partition = default(int?), bool? readOnlyProperty = default(bool?)) + { + FsType = fsType; + Partition = partition; + ReadOnlyProperty = readOnlyProperty; + VolumeID = volumeID; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets filesystem type of the volume that you want to mount. + /// Tip: Ensure that the filesystem type is supported by the host + /// operating system. Examples: "ext4", "xfs", "ntfs". Implicitly + /// inferred to be "ext4" if unspecified. More info: + /// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + /// + [JsonProperty(PropertyName = "fsType")] + public string FsType { get; set; } + + /// + /// Gets or sets the partition in the volume that you want to mount. If + /// omitted, the default is to mount by volume name. Examples: For + /// volume /dev/sda1, you specify the partition as "1". Similarly, the + /// volume partition for /dev/sda is "0" (or you can leave the property + /// empty). + /// + [JsonProperty(PropertyName = "partition")] + public int? Partition { get; set; } + + /// + /// Gets or sets specify "true" to force and set the ReadOnly property + /// in VolumeMounts to "true". If omitted, the default is "false". More + /// info: + /// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets unique ID of the persistent disk resource in AWS + /// (Amazon EBS volume). More info: + /// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + /// + [JsonProperty(PropertyName = "volumeID")] + public string VolumeID { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (VolumeID == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "VolumeID"); + } + } + } +} diff --git a/src/generated/Models/V1Affinity.cs b/src/generated/Models/V1Affinity.cs new file mode 100755 index 000000000..c25816dae --- /dev/null +++ b/src/generated/Models/V1Affinity.cs @@ -0,0 +1,83 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Affinity is a group of affinity scheduling rules. + /// + public partial class V1Affinity + { + /// + /// Initializes a new instance of the V1Affinity class. + /// + public V1Affinity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Affinity class. + /// + /// Describes node affinity scheduling rules + /// for the pod. + /// Describes pod affinity scheduling rules + /// (e.g. co-locate this pod in the same node, zone, etc. as some other + /// pod(s)). + /// Describes pod anti-affinity + /// scheduling rules (e.g. avoid putting this pod in the same node, + /// zone, etc. as some other pod(s)). + public V1Affinity(V1NodeAffinity nodeAffinity = default(V1NodeAffinity), V1PodAffinity podAffinity = default(V1PodAffinity), V1PodAntiAffinity podAntiAffinity = default(V1PodAntiAffinity)) + { + NodeAffinity = nodeAffinity; + PodAffinity = podAffinity; + PodAntiAffinity = podAntiAffinity; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes node affinity scheduling rules for the pod. + /// + [JsonProperty(PropertyName = "nodeAffinity")] + public V1NodeAffinity NodeAffinity { get; set; } + + /// + /// Gets or sets describes pod affinity scheduling rules (e.g. + /// co-locate this pod in the same node, zone, etc. as some other + /// pod(s)). + /// + [JsonProperty(PropertyName = "podAffinity")] + public V1PodAffinity PodAffinity { get; set; } + + /// + /// Gets or sets describes pod anti-affinity scheduling rules (e.g. + /// avoid putting this pod in the same node, zone, etc. as some other + /// pod(s)). + /// + [JsonProperty(PropertyName = "podAntiAffinity")] + public V1PodAntiAffinity PodAntiAffinity { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (NodeAffinity != null) + { + NodeAffinity.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1AttachedVolume.cs b/src/generated/Models/V1AttachedVolume.cs new file mode 100755 index 000000000..54da810ed --- /dev/null +++ b/src/generated/Models/V1AttachedVolume.cs @@ -0,0 +1,73 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// AttachedVolume describes a volume attached to a node + /// + public partial class V1AttachedVolume + { + /// + /// Initializes a new instance of the V1AttachedVolume class. + /// + public V1AttachedVolume() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1AttachedVolume class. + /// + /// DevicePath represents the device path + /// where the volume should be available + /// Name of the attached volume + public V1AttachedVolume(string devicePath, string name) + { + DevicePath = devicePath; + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets devicePath represents the device path where the volume + /// should be available + /// + [JsonProperty(PropertyName = "devicePath")] + public string DevicePath { get; set; } + + /// + /// Gets or sets name of the attached volume + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DevicePath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DevicePath"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/src/generated/Models/V1AzureDiskVolumeSource.cs b/src/generated/Models/V1AzureDiskVolumeSource.cs new file mode 100755 index 000000000..413c800aa --- /dev/null +++ b/src/generated/Models/V1AzureDiskVolumeSource.cs @@ -0,0 +1,106 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// AzureDisk represents an Azure Data Disk mount on the host and bind + /// mount to the pod. + /// + public partial class V1AzureDiskVolumeSource + { + /// + /// Initializes a new instance of the V1AzureDiskVolumeSource class. + /// + public V1AzureDiskVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1AzureDiskVolumeSource class. + /// + /// The Name of the data disk in the blob + /// storage + /// The URI the data disk in the blob + /// storage + /// Host Caching mode: None, Read Only, Read + /// Write. + /// Filesystem type to mount. Must be a filesystem + /// type supported by the host operating system. Ex. "ext4", "xfs", + /// "ntfs". Implicitly inferred to be "ext4" if unspecified. + /// Defaults to false (read/write). + /// ReadOnly here will force the ReadOnly setting in + /// VolumeMounts. + public V1AzureDiskVolumeSource(string diskName, string diskURI, string cachingMode = default(string), string fsType = default(string), bool? readOnlyProperty = default(bool?)) + { + CachingMode = cachingMode; + DiskName = diskName; + DiskURI = diskURI; + FsType = fsType; + ReadOnlyProperty = readOnlyProperty; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets host Caching mode: None, Read Only, Read Write. + /// + [JsonProperty(PropertyName = "cachingMode")] + public string CachingMode { get; set; } + + /// + /// Gets or sets the Name of the data disk in the blob storage + /// + [JsonProperty(PropertyName = "diskName")] + public string DiskName { get; set; } + + /// + /// Gets or sets the URI the data disk in the blob storage + /// + [JsonProperty(PropertyName = "diskURI")] + public string DiskURI { get; set; } + + /// + /// Gets or sets filesystem type to mount. Must be a filesystem type + /// supported by the host operating system. Ex. "ext4", "xfs", "ntfs". + /// Implicitly inferred to be "ext4" if unspecified. + /// + [JsonProperty(PropertyName = "fsType")] + public string FsType { get; set; } + + /// + /// Gets or sets defaults to false (read/write). ReadOnly here will + /// force the ReadOnly setting in VolumeMounts. + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DiskName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DiskName"); + } + if (DiskURI == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DiskURI"); + } + } + } +} diff --git a/src/generated/Models/V1AzureFileVolumeSource.cs b/src/generated/Models/V1AzureFileVolumeSource.cs new file mode 100755 index 000000000..cfee45d40 --- /dev/null +++ b/src/generated/Models/V1AzureFileVolumeSource.cs @@ -0,0 +1,85 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// AzureFile represents an Azure File Service mount on the host and bind + /// mount to the pod. + /// + public partial class V1AzureFileVolumeSource + { + /// + /// Initializes a new instance of the V1AzureFileVolumeSource class. + /// + public V1AzureFileVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1AzureFileVolumeSource class. + /// + /// the name of secret that contains Azure + /// Storage Account Name and Key + /// Share Name + /// Defaults to false (read/write). + /// ReadOnly here will force the ReadOnly setting in + /// VolumeMounts. + public V1AzureFileVolumeSource(string secretName, string shareName, bool? readOnlyProperty = default(bool?)) + { + ReadOnlyProperty = readOnlyProperty; + SecretName = secretName; + ShareName = shareName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defaults to false (read/write). ReadOnly here will + /// force the ReadOnly setting in VolumeMounts. + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets the name of secret that contains Azure Storage Account + /// Name and Key + /// + [JsonProperty(PropertyName = "secretName")] + public string SecretName { get; set; } + + /// + /// Gets or sets share Name + /// + [JsonProperty(PropertyName = "shareName")] + public string ShareName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SecretName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SecretName"); + } + if (ShareName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ShareName"); + } + } + } +} diff --git a/src/generated/Models/V1Binding.cs b/src/generated/Models/V1Binding.cs new file mode 100755 index 000000000..cdc9ae725 --- /dev/null +++ b/src/generated/Models/V1Binding.cs @@ -0,0 +1,104 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Binding ties one object to another. For example, a pod is bound to a + /// node by a scheduler. + /// + public partial class V1Binding + { + /// + /// Initializes a new instance of the V1Binding class. + /// + public V1Binding() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Binding class. + /// + /// The target object that you want to bind to the + /// standard object. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1Binding(V1ObjectReference target, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Target = target; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets the target object that you want to bind to the + /// standard object. + /// + [JsonProperty(PropertyName = "target")] + public V1ObjectReference Target { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Target == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Target"); + } + } + } +} diff --git a/src/generated/Models/V1Capabilities.cs b/src/generated/Models/V1Capabilities.cs new file mode 100755 index 000000000..32e8ef94b --- /dev/null +++ b/src/generated/Models/V1Capabilities.cs @@ -0,0 +1,55 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Adds and removes POSIX capabilities from running containers. + /// + public partial class V1Capabilities + { + /// + /// Initializes a new instance of the V1Capabilities class. + /// + public V1Capabilities() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Capabilities class. + /// + /// Added capabilities + /// Removed capabilities + public V1Capabilities(IList add = default(IList), IList drop = default(IList)) + { + Add = add; + Drop = drop; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets added capabilities + /// + [JsonProperty(PropertyName = "add")] + public IList Add { get; set; } + + /// + /// Gets or sets removed capabilities + /// + [JsonProperty(PropertyName = "drop")] + public IList Drop { get; set; } + + } +} diff --git a/src/generated/Models/V1CephFSVolumeSource.cs b/src/generated/Models/V1CephFSVolumeSource.cs new file mode 100755 index 000000000..0a086f1e3 --- /dev/null +++ b/src/generated/Models/V1CephFSVolumeSource.cs @@ -0,0 +1,126 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Represents a Ceph Filesystem mount that lasts the lifetime of a pod + /// Cephfs volumes do not support ownership management or SELinux + /// relabeling. + /// + public partial class V1CephFSVolumeSource + { + /// + /// Initializes a new instance of the V1CephFSVolumeSource class. + /// + public V1CephFSVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1CephFSVolumeSource class. + /// + /// Required: Monitors is a collection of Ceph + /// monitors More info: + /// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + /// Optional: Used as the mounted root, rather than + /// the full Ceph tree, default is / + /// Optional: Defaults to false + /// (read/write). ReadOnly here will force the ReadOnly setting in + /// VolumeMounts. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + /// Optional: SecretFile is the path to key + /// ring for User, default is /etc/ceph/user.secret More info: + /// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + /// Optional: SecretRef is reference to the + /// authentication secret for User, default is empty. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + /// Optional: User is the rados user name, default + /// is admin More info: + /// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + public V1CephFSVolumeSource(IList monitors, string path = default(string), bool? readOnlyProperty = default(bool?), string secretFile = default(string), V1LocalObjectReference secretRef = default(V1LocalObjectReference), string user = default(string)) + { + Monitors = monitors; + Path = path; + ReadOnlyProperty = readOnlyProperty; + SecretFile = secretFile; + SecretRef = secretRef; + User = user; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets required: Monitors is a collection of Ceph monitors + /// More info: + /// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + /// + [JsonProperty(PropertyName = "monitors")] + public IList Monitors { get; set; } + + /// + /// Gets or sets optional: Used as the mounted root, rather than the + /// full Ceph tree, default is / + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or sets optional: Defaults to false (read/write). ReadOnly + /// here will force the ReadOnly setting in VolumeMounts. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets optional: SecretFile is the path to key ring for User, + /// default is /etc/ceph/user.secret More info: + /// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + /// + [JsonProperty(PropertyName = "secretFile")] + public string SecretFile { get; set; } + + /// + /// Gets or sets optional: SecretRef is reference to the authentication + /// secret for User, default is empty. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + /// + [JsonProperty(PropertyName = "secretRef")] + public V1LocalObjectReference SecretRef { get; set; } + + /// + /// Gets or sets optional: User is the rados user name, default is + /// admin More info: + /// http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it + /// + [JsonProperty(PropertyName = "user")] + public string User { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Monitors == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Monitors"); + } + } + } +} diff --git a/src/generated/Models/V1CinderVolumeSource.cs b/src/generated/Models/V1CinderVolumeSource.cs new file mode 100755 index 000000000..32fbfcb28 --- /dev/null +++ b/src/generated/Models/V1CinderVolumeSource.cs @@ -0,0 +1,94 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a cinder volume resource in Openstack. A Cinder volume must + /// exist before mounting to a container. The volume must also be in the + /// same region as the kubelet. Cinder volumes support ownership management + /// and SELinux relabeling. + /// + public partial class V1CinderVolumeSource + { + /// + /// Initializes a new instance of the V1CinderVolumeSource class. + /// + public V1CinderVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1CinderVolumeSource class. + /// + /// volume id used to identify the volume in + /// cinder More info: + /// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + /// Filesystem type to mount. Must be a filesystem + /// type supported by the host operating system. Examples: "ext4", + /// "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + /// More info: + /// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + /// Optional: Defaults to false + /// (read/write). ReadOnly here will force the ReadOnly setting in + /// VolumeMounts. More info: + /// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + public V1CinderVolumeSource(string volumeID, string fsType = default(string), bool? readOnlyProperty = default(bool?)) + { + FsType = fsType; + ReadOnlyProperty = readOnlyProperty; + VolumeID = volumeID; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets filesystem type to mount. Must be a filesystem type + /// supported by the host operating system. Examples: "ext4", "xfs", + /// "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: + /// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + /// + [JsonProperty(PropertyName = "fsType")] + public string FsType { get; set; } + + /// + /// Gets or sets optional: Defaults to false (read/write). ReadOnly + /// here will force the ReadOnly setting in VolumeMounts. More info: + /// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets volume id used to identify the volume in cinder More + /// info: + /// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + /// + [JsonProperty(PropertyName = "volumeID")] + public string VolumeID { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (VolumeID == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "VolumeID"); + } + } + } +} diff --git a/src/generated/Models/V1ComponentCondition.cs b/src/generated/Models/V1ComponentCondition.cs new file mode 100755 index 000000000..49a7ebe8d --- /dev/null +++ b/src/generated/Models/V1ComponentCondition.cs @@ -0,0 +1,95 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Information about the condition of a component. + /// + public partial class V1ComponentCondition + { + /// + /// Initializes a new instance of the V1ComponentCondition class. + /// + public V1ComponentCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ComponentCondition class. + /// + /// Status of the condition for a component. Valid + /// values for "Healthy": "True", "False", or "Unknown". + /// Type of condition for a component. Valid value: + /// "Healthy" + /// Condition error code for a component. For + /// example, a health check error code. + /// Message about the condition for a component. + /// For example, information about a health check. + public V1ComponentCondition(string status, string type, string error = default(string), string message = default(string)) + { + Error = error; + Message = message; + Status = status; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets condition error code for a component. For example, a + /// health check error code. + /// + [JsonProperty(PropertyName = "error")] + public string Error { get; set; } + + /// + /// Gets or sets message about the condition for a component. For + /// example, information about a health check. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets status of the condition for a component. Valid values + /// for "Healthy": "True", "False", or "Unknown". + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets type of condition for a component. Valid value: + /// "Healthy" + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Status"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/src/generated/Models/V1ComponentStatus.cs b/src/generated/Models/V1ComponentStatus.cs new file mode 100755 index 000000000..2c3143b58 --- /dev/null +++ b/src/generated/Models/V1ComponentStatus.cs @@ -0,0 +1,91 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ComponentStatus (and ComponentStatusList) holds the cluster validation + /// info. + /// + public partial class V1ComponentStatus + { + /// + /// Initializes a new instance of the V1ComponentStatus class. + /// + public V1ComponentStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ComponentStatus class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// List of component conditions + /// observed + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1ComponentStatus(string apiVersion = default(string), IList conditions = default(IList), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + Conditions = conditions; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of component conditions observed + /// + [JsonProperty(PropertyName = "conditions")] + public IList Conditions { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + } +} diff --git a/src/generated/Models/V1ComponentStatusList.cs b/src/generated/Models/V1ComponentStatusList.cs new file mode 100755 index 000000000..440bf77fa --- /dev/null +++ b/src/generated/Models/V1ComponentStatusList.cs @@ -0,0 +1,104 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Status of all the conditions for the component as a list of + /// ComponentStatus objects. + /// + public partial class V1ComponentStatusList + { + /// + /// Initializes a new instance of the V1ComponentStatusList class. + /// + public V1ComponentStatusList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ComponentStatusList class. + /// + /// List of ComponentStatus objects. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1ComponentStatusList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of ComponentStatus objects. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + } + } +} diff --git a/src/generated/Models/V1ConfigMap.cs b/src/generated/Models/V1ConfigMap.cs new file mode 100755 index 000000000..6eb554482 --- /dev/null +++ b/src/generated/Models/V1ConfigMap.cs @@ -0,0 +1,91 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ConfigMap holds configuration data for pods to consume. + /// + public partial class V1ConfigMap + { + /// + /// Initializes a new instance of the V1ConfigMap class. + /// + public V1ConfigMap() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ConfigMap class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Data contains the configuration data. Each key + /// must be a valid DNS_SUBDOMAIN with an optional leading dot. + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1ConfigMap(string apiVersion = default(string), IDictionary data = default(IDictionary), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + Data = data; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets data contains the configuration data. Each key must be + /// a valid DNS_SUBDOMAIN with an optional leading dot. + /// + [JsonProperty(PropertyName = "data")] + public IDictionary Data { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + } +} diff --git a/src/generated/Models/V1ConfigMapEnvSource.cs b/src/generated/Models/V1ConfigMapEnvSource.cs new file mode 100755 index 000000000..99d158dd0 --- /dev/null +++ b/src/generated/Models/V1ConfigMapEnvSource.cs @@ -0,0 +1,60 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ConfigMapEnvSource selects a ConfigMap to populate the environment + /// variables with. + /// + /// The contents of the target ConfigMap's Data field will represent the + /// key-value pairs as environment variables. + /// + public partial class V1ConfigMapEnvSource + { + /// + /// Initializes a new instance of the V1ConfigMapEnvSource class. + /// + public V1ConfigMapEnvSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ConfigMapEnvSource class. + /// + /// Name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// Specify whether the ConfigMap must be + /// defined + public V1ConfigMapEnvSource(string name = default(string), bool? optional = default(bool?)) + { + Name = name; + Optional = optional; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets specify whether the ConfigMap must be defined + /// + [JsonProperty(PropertyName = "optional")] + public bool? Optional { get; set; } + + } +} diff --git a/src/generated/Models/V1ConfigMapKeySelector.cs b/src/generated/Models/V1ConfigMapKeySelector.cs new file mode 100755 index 000000000..f45e1362a --- /dev/null +++ b/src/generated/Models/V1ConfigMapKeySelector.cs @@ -0,0 +1,79 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Selects a key from a ConfigMap. + /// + public partial class V1ConfigMapKeySelector + { + /// + /// Initializes a new instance of the V1ConfigMapKeySelector class. + /// + public V1ConfigMapKeySelector() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ConfigMapKeySelector class. + /// + /// The key to select. + /// Name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// Specify whether the ConfigMap or it's key + /// must be defined + public V1ConfigMapKeySelector(string key, string name = default(string), bool? optional = default(bool?)) + { + Key = key; + Name = name; + Optional = optional; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the key to select. + /// + [JsonProperty(PropertyName = "key")] + public string Key { get; set; } + + /// + /// Gets or sets name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets specify whether the ConfigMap or it's key must be + /// defined + /// + [JsonProperty(PropertyName = "optional")] + public bool? Optional { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Key == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Key"); + } + } + } +} diff --git a/src/generated/Models/V1ConfigMapList.cs b/src/generated/Models/V1ConfigMapList.cs new file mode 100755 index 000000000..2cc0a4e0f --- /dev/null +++ b/src/generated/Models/V1ConfigMapList.cs @@ -0,0 +1,103 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ConfigMapList is a resource containing a list of ConfigMap objects. + /// + public partial class V1ConfigMapList + { + /// + /// Initializes a new instance of the V1ConfigMapList class. + /// + public V1ConfigMapList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ConfigMapList class. + /// + /// Items is the list of ConfigMaps. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1ConfigMapList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is the list of ConfigMaps. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets more info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + } + } +} diff --git a/src/generated/Models/V1ConfigMapProjection.cs b/src/generated/Models/V1ConfigMapProjection.cs new file mode 100755 index 000000000..949fc247d --- /dev/null +++ b/src/generated/Models/V1ConfigMapProjection.cs @@ -0,0 +1,87 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Adapts a ConfigMap into a projected volume. + /// + /// The contents of the target ConfigMap's Data field will be presented in + /// a projected volume as files using the keys in the Data field as the + /// file names, unless the items element is populated with specific + /// mappings of keys to paths. Note that this is identical to a configmap + /// volume source without the default mode. + /// + public partial class V1ConfigMapProjection + { + /// + /// Initializes a new instance of the V1ConfigMapProjection class. + /// + public V1ConfigMapProjection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ConfigMapProjection class. + /// + /// If unspecified, each key-value pair in the Data + /// field of the referenced ConfigMap will be projected into the volume + /// as a file whose name is the key and content is the value. If + /// specified, the listed keys will be projected into the specified + /// paths, and unlisted keys will not be present. If a key is specified + /// which is not present in the ConfigMap, the volume setup will error + /// unless it is marked optional. Paths must be relative and may not + /// contain the '..' path or start with '..'. + /// Name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// Specify whether the ConfigMap or it's keys + /// must be defined + public V1ConfigMapProjection(IList items = default(IList), string name = default(string), bool? optional = default(bool?)) + { + Items = items; + Name = name; + Optional = optional; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if unspecified, each key-value pair in the Data field + /// of the referenced ConfigMap will be projected into the volume as a + /// file whose name is the key and content is the value. If specified, + /// the listed keys will be projected into the specified paths, and + /// unlisted keys will not be present. If a key is specified which is + /// not present in the ConfigMap, the volume setup will error unless it + /// is marked optional. Paths must be relative and may not contain the + /// '..' path or start with '..'. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets specify whether the ConfigMap or it's keys must be + /// defined + /// + [JsonProperty(PropertyName = "optional")] + public bool? Optional { get; set; } + + } +} diff --git a/src/generated/Models/V1ConfigMapVolumeSource.cs b/src/generated/Models/V1ConfigMapVolumeSource.cs new file mode 100755 index 000000000..92d05059e --- /dev/null +++ b/src/generated/Models/V1ConfigMapVolumeSource.cs @@ -0,0 +1,104 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Adapts a ConfigMap into a volume. + /// + /// The contents of the target ConfigMap's Data field will be presented in + /// a volume as files using the keys in the Data field as the file names, + /// unless the items element is populated with specific mappings of keys to + /// paths. ConfigMap volumes support ownership management and SELinux + /// relabeling. + /// + public partial class V1ConfigMapVolumeSource + { + /// + /// Initializes a new instance of the V1ConfigMapVolumeSource class. + /// + public V1ConfigMapVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ConfigMapVolumeSource class. + /// + /// Optional: mode bits to use on created + /// files by default. Must be a value between 0 and 0777. Defaults to + /// 0644. Directories within the path are not affected by this setting. + /// This might be in conflict with other options that affect the file + /// mode, like fsGroup, and the result can be other mode bits + /// set. + /// If unspecified, each key-value pair in the Data + /// field of the referenced ConfigMap will be projected into the volume + /// as a file whose name is the key and content is the value. If + /// specified, the listed keys will be projected into the specified + /// paths, and unlisted keys will not be present. If a key is specified + /// which is not present in the ConfigMap, the volume setup will error + /// unless it is marked optional. Paths must be relative and may not + /// contain the '..' path or start with '..'. + /// Name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// Specify whether the ConfigMap or it's keys + /// must be defined + public V1ConfigMapVolumeSource(int? defaultMode = default(int?), IList items = default(IList), string name = default(string), bool? optional = default(bool?)) + { + DefaultMode = defaultMode; + Items = items; + Name = name; + Optional = optional; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets optional: mode bits to use on created files by + /// default. Must be a value between 0 and 0777. Defaults to 0644. + /// Directories within the path are not affected by this setting. This + /// might be in conflict with other options that affect the file mode, + /// like fsGroup, and the result can be other mode bits set. + /// + [JsonProperty(PropertyName = "defaultMode")] + public int? DefaultMode { get; set; } + + /// + /// Gets or sets if unspecified, each key-value pair in the Data field + /// of the referenced ConfigMap will be projected into the volume as a + /// file whose name is the key and content is the value. If specified, + /// the listed keys will be projected into the specified paths, and + /// unlisted keys will not be present. If a key is specified which is + /// not present in the ConfigMap, the volume setup will error unless it + /// is marked optional. Paths must be relative and may not contain the + /// '..' path or start with '..'. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets specify whether the ConfigMap or it's keys must be + /// defined + /// + [JsonProperty(PropertyName = "optional")] + public bool? Optional { get; set; } + + } +} diff --git a/src/generated/Models/V1Container.cs b/src/generated/Models/V1Container.cs new file mode 100755 index 000000000..873b82b8f --- /dev/null +++ b/src/generated/Models/V1Container.cs @@ -0,0 +1,402 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A single application container that you want to run within a pod. + /// + public partial class V1Container + { + /// + /// Initializes a new instance of the V1Container class. + /// + public V1Container() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Container class. + /// + /// Name of the container specified as a DNS_LABEL. + /// Each container in a pod must have a unique name (DNS_LABEL). Cannot + /// be updated. + /// Arguments to the entrypoint. The docker image's + /// CMD is used if this is not provided. Variable references + /// $(VAR_NAME) are expanded using the container's environment. If a + /// variable cannot be resolved, the reference in the input string will + /// be unchanged. The $(VAR_NAME) syntax can be escaped with a double + /// $$, ie: $$(VAR_NAME). Escaped references will never be expanded, + /// regardless of whether the variable exists or not. Cannot be + /// updated. More info: + /// http://kubernetes.io/docs/user-guide/containers#containers-and-commands + /// Entrypoint array. Not executed within a + /// shell. The docker image's ENTRYPOINT is used if this is not + /// provided. Variable references $(VAR_NAME) are expanded using the + /// container's environment. If a variable cannot be resolved, the + /// reference in the input string will be unchanged. The $(VAR_NAME) + /// syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped + /// references will never be expanded, regardless of whether the + /// variable exists or not. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/containers#containers-and-commands + /// List of environment variables to set in the + /// container. Cannot be updated. + /// List of sources to populate environment + /// variables in the container. The keys defined within a source must + /// be a C_IDENTIFIER. All invalid keys will be reported as an event + /// when the container is starting. When a key exists in multiple + /// sources, the value associated with the last source will take + /// precedence. Values defined by an Env with a duplicate key will take + /// precedence. Cannot be updated. + /// Docker image name. More info: + /// http://kubernetes.io/docs/user-guide/images + /// Image pull policy. One of Always, + /// Never, IfNotPresent. Defaults to Always if :latest tag is + /// specified, or IfNotPresent otherwise. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/images#updating-images + /// Actions that the management system should + /// take in response to container lifecycle events. Cannot be + /// updated. + /// Periodic probe of container liveness. + /// Container will be restarted if the probe fails. Cannot be updated. + /// More info: + /// http://kubernetes.io/docs/user-guide/pod-states#container-probes + /// List of ports to expose from the container. + /// Exposing a port here gives the system additional information about + /// the network connections a container uses, but is primarily + /// informational. Not specifying a port here DOES NOT prevent that + /// port from being exposed. Any port which is listening on the default + /// "0.0.0.0" address inside a container will be accessible from the + /// network. Cannot be updated. + /// Periodic probe of container service + /// readiness. Container will be removed from service endpoints if the + /// probe fails. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#container-probes + /// Compute Resources required by this + /// container. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#resources + /// Security options the pod should run + /// with. More info: + /// http://releases.k8s.io/HEAD/docs/design/security_context.md + /// Whether this container should allocate a buffer + /// for stdin in the container runtime. If this is not set, reads from + /// stdin in the container will always result in EOF. Default is + /// false. + /// Whether the container runtime should close + /// the stdin channel after it has been opened by a single attach. When + /// stdin is true the stdin stream will remain open across multiple + /// attach sessions. If stdinOnce is set to true, stdin is opened on + /// container start, is empty until the first client attaches to stdin, + /// and then remains open and accepts data until the client + /// disconnects, at which time stdin is closed and remains closed until + /// the container is restarted. If this flag is false, a container + /// processes that reads from stdin will never receive an EOF. Default + /// is false + /// Optional: Path at which the + /// file to which the container's termination message will be written + /// is mounted into the container's filesystem. Message written is + /// intended to be brief final status, such as an assertion failure + /// message. Will be truncated by the node if greater than 4096 bytes. + /// The total message length across all containers will be limited to + /// 12kb. Defaults to /dev/termination-log. Cannot be updated. + /// Indicate how the termination + /// message should be populated. File will use the contents of + /// terminationMessagePath to populate the container status message on + /// both success and failure. FallbackToLogsOnError will use the last + /// chunk of container log output if the termination message file is + /// empty and the container exited with an error. The log output is + /// limited to 2048 bytes or 80 lines, whichever is smaller. Defaults + /// to File. Cannot be updated. + /// Whether this container should allocate a TTY for + /// itself, also requires 'stdin' to be true. Default is false. + /// Pod volumes to mount into the + /// container's filesystem. Cannot be updated. + /// Container's working directory. If not + /// specified, the container runtime's default will be used, which + /// might be configured in the container image. Cannot be + /// updated. + public V1Container(string name, IList args = default(IList), IList command = default(IList), IList env = default(IList), IList envFrom = default(IList), string image = default(string), string imagePullPolicy = default(string), V1Lifecycle lifecycle = default(V1Lifecycle), V1Probe livenessProbe = default(V1Probe), IList ports = default(IList), V1Probe readinessProbe = default(V1Probe), V1ResourceRequirements resources = default(V1ResourceRequirements), V1SecurityContext securityContext = default(V1SecurityContext), bool? stdin = default(bool?), bool? stdinOnce = default(bool?), string terminationMessagePath = default(string), string terminationMessagePolicy = default(string), bool? tty = default(bool?), IList volumeMounts = default(IList), string workingDir = default(string)) + { + Args = args; + Command = command; + Env = env; + EnvFrom = envFrom; + Image = image; + ImagePullPolicy = imagePullPolicy; + Lifecycle = lifecycle; + LivenessProbe = livenessProbe; + Name = name; + Ports = ports; + ReadinessProbe = readinessProbe; + Resources = resources; + SecurityContext = securityContext; + Stdin = stdin; + StdinOnce = stdinOnce; + TerminationMessagePath = terminationMessagePath; + TerminationMessagePolicy = terminationMessagePolicy; + Tty = tty; + VolumeMounts = volumeMounts; + WorkingDir = workingDir; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets arguments to the entrypoint. The docker image's CMD is + /// used if this is not provided. Variable references $(VAR_NAME) are + /// expanded using the container's environment. If a variable cannot be + /// resolved, the reference in the input string will be unchanged. The + /// $(VAR_NAME) syntax can be escaped with a double $$, ie: + /// $$(VAR_NAME). Escaped references will never be expanded, regardless + /// of whether the variable exists or not. Cannot be updated. More + /// info: + /// http://kubernetes.io/docs/user-guide/containers#containers-and-commands + /// + [JsonProperty(PropertyName = "args")] + public IList Args { get; set; } + + /// + /// Gets or sets entrypoint array. Not executed within a shell. The + /// docker image's ENTRYPOINT is used if this is not provided. Variable + /// references $(VAR_NAME) are expanded using the container's + /// environment. If a variable cannot be resolved, the reference in the + /// input string will be unchanged. The $(VAR_NAME) syntax can be + /// escaped with a double $$, ie: $$(VAR_NAME). Escaped references will + /// never be expanded, regardless of whether the variable exists or + /// not. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/containers#containers-and-commands + /// + [JsonProperty(PropertyName = "command")] + public IList Command { get; set; } + + /// + /// Gets or sets list of environment variables to set in the container. + /// Cannot be updated. + /// + [JsonProperty(PropertyName = "env")] + public IList Env { get; set; } + + /// + /// Gets or sets list of sources to populate environment variables in + /// the container. The keys defined within a source must be a + /// C_IDENTIFIER. All invalid keys will be reported as an event when + /// the container is starting. When a key exists in multiple sources, + /// the value associated with the last source will take precedence. + /// Values defined by an Env with a duplicate key will take precedence. + /// Cannot be updated. + /// + [JsonProperty(PropertyName = "envFrom")] + public IList EnvFrom { get; set; } + + /// + /// Gets or sets docker image name. More info: + /// http://kubernetes.io/docs/user-guide/images + /// + [JsonProperty(PropertyName = "image")] + public string Image { get; set; } + + /// + /// Gets or sets image pull policy. One of Always, Never, IfNotPresent. + /// Defaults to Always if :latest tag is specified, or IfNotPresent + /// otherwise. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/images#updating-images + /// + [JsonProperty(PropertyName = "imagePullPolicy")] + public string ImagePullPolicy { get; set; } + + /// + /// Gets or sets actions that the management system should take in + /// response to container lifecycle events. Cannot be updated. + /// + [JsonProperty(PropertyName = "lifecycle")] + public V1Lifecycle Lifecycle { get; set; } + + /// + /// Gets or sets periodic probe of container liveness. Container will + /// be restarted if the probe fails. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#container-probes + /// + [JsonProperty(PropertyName = "livenessProbe")] + public V1Probe LivenessProbe { get; set; } + + /// + /// Gets or sets name of the container specified as a DNS_LABEL. Each + /// container in a pod must have a unique name (DNS_LABEL). Cannot be + /// updated. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets list of ports to expose from the container. Exposing a + /// port here gives the system additional information about the network + /// connections a container uses, but is primarily informational. Not + /// specifying a port here DOES NOT prevent that port from being + /// exposed. Any port which is listening on the default "0.0.0.0" + /// address inside a container will be accessible from the network. + /// Cannot be updated. + /// + [JsonProperty(PropertyName = "ports")] + public IList Ports { get; set; } + + /// + /// Gets or sets periodic probe of container service readiness. + /// Container will be removed from service endpoints if the probe + /// fails. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#container-probes + /// + [JsonProperty(PropertyName = "readinessProbe")] + public V1Probe ReadinessProbe { get; set; } + + /// + /// Gets or sets compute Resources required by this container. Cannot + /// be updated. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#resources + /// + [JsonProperty(PropertyName = "resources")] + public V1ResourceRequirements Resources { get; set; } + + /// + /// Gets or sets security options the pod should run with. More info: + /// http://releases.k8s.io/HEAD/docs/design/security_context.md + /// + [JsonProperty(PropertyName = "securityContext")] + public V1SecurityContext SecurityContext { get; set; } + + /// + /// Gets or sets whether this container should allocate a buffer for + /// stdin in the container runtime. If this is not set, reads from + /// stdin in the container will always result in EOF. Default is false. + /// + [JsonProperty(PropertyName = "stdin")] + public bool? Stdin { get; set; } + + /// + /// Gets or sets whether the container runtime should close the stdin + /// channel after it has been opened by a single attach. When stdin is + /// true the stdin stream will remain open across multiple attach + /// sessions. If stdinOnce is set to true, stdin is opened on container + /// start, is empty until the first client attaches to stdin, and then + /// remains open and accepts data until the client disconnects, at + /// which time stdin is closed and remains closed until the container + /// is restarted. If this flag is false, a container processes that + /// reads from stdin will never receive an EOF. Default is false + /// + [JsonProperty(PropertyName = "stdinOnce")] + public bool? StdinOnce { get; set; } + + /// + /// Gets or sets optional: Path at which the file to which the + /// container's termination message will be written is mounted into the + /// container's filesystem. Message written is intended to be brief + /// final status, such as an assertion failure message. Will be + /// truncated by the node if greater than 4096 bytes. The total message + /// length across all containers will be limited to 12kb. Defaults to + /// /dev/termination-log. Cannot be updated. + /// + [JsonProperty(PropertyName = "terminationMessagePath")] + public string TerminationMessagePath { get; set; } + + /// + /// Gets or sets indicate how the termination message should be + /// populated. File will use the contents of terminationMessagePath to + /// populate the container status message on both success and failure. + /// FallbackToLogsOnError will use the last chunk of container log + /// output if the termination message file is empty and the container + /// exited with an error. The log output is limited to 2048 bytes or 80 + /// lines, whichever is smaller. Defaults to File. Cannot be updated. + /// + [JsonProperty(PropertyName = "terminationMessagePolicy")] + public string TerminationMessagePolicy { get; set; } + + /// + /// Gets or sets whether this container should allocate a TTY for + /// itself, also requires 'stdin' to be true. Default is false. + /// + [JsonProperty(PropertyName = "tty")] + public bool? Tty { get; set; } + + /// + /// Gets or sets pod volumes to mount into the container's filesystem. + /// Cannot be updated. + /// + [JsonProperty(PropertyName = "volumeMounts")] + public IList VolumeMounts { get; set; } + + /// + /// Gets or sets container's working directory. If not specified, the + /// container runtime's default will be used, which might be configured + /// in the container image. Cannot be updated. + /// + [JsonProperty(PropertyName = "workingDir")] + public string WorkingDir { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (Env != null) + { + foreach (var element in Env) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Lifecycle != null) + { + Lifecycle.Validate(); + } + if (LivenessProbe != null) + { + LivenessProbe.Validate(); + } + if (Ports != null) + { + foreach (var element1 in Ports) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (ReadinessProbe != null) + { + ReadinessProbe.Validate(); + } + if (VolumeMounts != null) + { + foreach (var element2 in VolumeMounts) + { + if (element2 != null) + { + element2.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1ContainerImage.cs b/src/generated/Models/V1ContainerImage.cs new file mode 100755 index 000000000..b1852f750 --- /dev/null +++ b/src/generated/Models/V1ContainerImage.cs @@ -0,0 +1,73 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Describe a container image + /// + public partial class V1ContainerImage + { + /// + /// Initializes a new instance of the V1ContainerImage class. + /// + public V1ContainerImage() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ContainerImage class. + /// + /// Names by which this image is known. e.g. + /// ["gcr.io/google_containers/hyperkube:v1.0.7", + /// "dockerhub.io/google_containers/hyperkube:v1.0.7"] + /// The size of the image in bytes. + public V1ContainerImage(IList names, long? sizeBytes = default(long?)) + { + Names = names; + SizeBytes = sizeBytes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets names by which this image is known. e.g. + /// ["gcr.io/google_containers/hyperkube:v1.0.7", + /// "dockerhub.io/google_containers/hyperkube:v1.0.7"] + /// + [JsonProperty(PropertyName = "names")] + public IList Names { get; set; } + + /// + /// Gets or sets the size of the image in bytes. + /// + [JsonProperty(PropertyName = "sizeBytes")] + public long? SizeBytes { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Names == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Names"); + } + } + } +} diff --git a/src/generated/Models/V1ContainerPort.cs b/src/generated/Models/V1ContainerPort.cs new file mode 100755 index 000000000..0948433d8 --- /dev/null +++ b/src/generated/Models/V1ContainerPort.cs @@ -0,0 +1,104 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ContainerPort represents a network port in a single container. + /// + public partial class V1ContainerPort + { + /// + /// Initializes a new instance of the V1ContainerPort class. + /// + public V1ContainerPort() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ContainerPort class. + /// + /// Number of port to expose on the pod's + /// IP address. This must be a valid port number, 0 < x < + /// 65536. + /// What host IP to bind the external port + /// to. + /// Number of port to expose on the host. If + /// specified, this must be a valid port number, 0 < x < 65536. + /// If HostNetwork is specified, this must match ContainerPort. Most + /// containers do not need this. + /// If specified, this must be an IANA_SVC_NAME and + /// unique within the pod. Each named port in a pod must have a unique + /// name. Name for the port that can be referred to by + /// services. + /// Protocol for port. Must be UDP or TCP. + /// Defaults to "TCP". + public V1ContainerPort(int containerPort, string hostIP = default(string), int? hostPort = default(int?), string name = default(string), string protocol = default(string)) + { + ContainerPort = containerPort; + HostIP = hostIP; + HostPort = hostPort; + Name = name; + Protocol = protocol; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets number of port to expose on the pod's IP address. This + /// must be a valid port number, 0 &lt; x &lt; 65536. + /// + [JsonProperty(PropertyName = "containerPort")] + public int ContainerPort { get; set; } + + /// + /// Gets or sets what host IP to bind the external port to. + /// + [JsonProperty(PropertyName = "hostIP")] + public string HostIP { get; set; } + + /// + /// Gets or sets number of port to expose on the host. If specified, + /// this must be a valid port number, 0 &lt; x &lt; 65536. If + /// HostNetwork is specified, this must match ContainerPort. Most + /// containers do not need this. + /// + [JsonProperty(PropertyName = "hostPort")] + public int? HostPort { get; set; } + + /// + /// Gets or sets if specified, this must be an IANA_SVC_NAME and unique + /// within the pod. Each named port in a pod must have a unique name. + /// Name for the port that can be referred to by services. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets protocol for port. Must be UDP or TCP. Defaults to + /// "TCP". + /// + [JsonProperty(PropertyName = "protocol")] + public string Protocol { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1ContainerState.cs b/src/generated/Models/V1ContainerState.cs new file mode 100755 index 000000000..2af67c023 --- /dev/null +++ b/src/generated/Models/V1ContainerState.cs @@ -0,0 +1,77 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ContainerState holds a possible state of container. Only one of its + /// members may be specified. If none of them is specified, the default one + /// is ContainerStateWaiting. + /// + public partial class V1ContainerState + { + /// + /// Initializes a new instance of the V1ContainerState class. + /// + public V1ContainerState() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ContainerState class. + /// + /// Details about a running container + /// Details about a terminated + /// container + /// Details about a waiting container + public V1ContainerState(V1ContainerStateRunning running = default(V1ContainerStateRunning), V1ContainerStateTerminated terminated = default(V1ContainerStateTerminated), V1ContainerStateWaiting waiting = default(V1ContainerStateWaiting)) + { + Running = running; + Terminated = terminated; + Waiting = waiting; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets details about a running container + /// + [JsonProperty(PropertyName = "running")] + public V1ContainerStateRunning Running { get; set; } + + /// + /// Gets or sets details about a terminated container + /// + [JsonProperty(PropertyName = "terminated")] + public V1ContainerStateTerminated Terminated { get; set; } + + /// + /// Gets or sets details about a waiting container + /// + [JsonProperty(PropertyName = "waiting")] + public V1ContainerStateWaiting Waiting { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Terminated != null) + { + Terminated.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1ContainerStateRunning.cs b/src/generated/Models/V1ContainerStateRunning.cs new file mode 100755 index 000000000..f9f809ba6 --- /dev/null +++ b/src/generated/Models/V1ContainerStateRunning.cs @@ -0,0 +1,46 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ContainerStateRunning is a running state of a container. + /// + public partial class V1ContainerStateRunning + { + /// + /// Initializes a new instance of the V1ContainerStateRunning class. + /// + public V1ContainerStateRunning() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ContainerStateRunning class. + /// + /// Time at which the container was last + /// (re-)started + public V1ContainerStateRunning(System.DateTime? startedAt = default(System.DateTime?)) + { + StartedAt = startedAt; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets time at which the container was last (re-)started + /// + [JsonProperty(PropertyName = "startedAt")] + public System.DateTime? StartedAt { get; set; } + + } +} diff --git a/src/generated/Models/V1ContainerStateTerminated.cs b/src/generated/Models/V1ContainerStateTerminated.cs new file mode 100755 index 000000000..2fd4b4dfb --- /dev/null +++ b/src/generated/Models/V1ContainerStateTerminated.cs @@ -0,0 +1,114 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ContainerStateTerminated is a terminated state of a container. + /// + public partial class V1ContainerStateTerminated + { + /// + /// Initializes a new instance of the V1ContainerStateTerminated class. + /// + public V1ContainerStateTerminated() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ContainerStateTerminated class. + /// + /// Exit status from the last termination of the + /// container + /// Container's ID in the format + /// 'docker://<container_id>' + /// Time at which the container last + /// terminated + /// Message regarding the last termination of the + /// container + /// (brief) reason from the last termination of + /// the container + /// Signal from the last termination of the + /// container + /// Time at which previous execution of the + /// container started + public V1ContainerStateTerminated(int exitCode, string containerID = default(string), System.DateTime? finishedAt = default(System.DateTime?), string message = default(string), string reason = default(string), int? signal = default(int?), System.DateTime? startedAt = default(System.DateTime?)) + { + ContainerID = containerID; + ExitCode = exitCode; + FinishedAt = finishedAt; + Message = message; + Reason = reason; + Signal = signal; + StartedAt = startedAt; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets container's ID in the format + /// 'docker://&lt;container_id&gt;' + /// + [JsonProperty(PropertyName = "containerID")] + public string ContainerID { get; set; } + + /// + /// Gets or sets exit status from the last termination of the container + /// + [JsonProperty(PropertyName = "exitCode")] + public int ExitCode { get; set; } + + /// + /// Gets or sets time at which the container last terminated + /// + [JsonProperty(PropertyName = "finishedAt")] + public System.DateTime? FinishedAt { get; set; } + + /// + /// Gets or sets message regarding the last termination of the + /// container + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets (brief) reason from the last termination of the + /// container + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets signal from the last termination of the container + /// + [JsonProperty(PropertyName = "signal")] + public int? Signal { get; set; } + + /// + /// Gets or sets time at which previous execution of the container + /// started + /// + [JsonProperty(PropertyName = "startedAt")] + public System.DateTime? StartedAt { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1ContainerStateWaiting.cs b/src/generated/Models/V1ContainerStateWaiting.cs new file mode 100755 index 000000000..bc1f38f28 --- /dev/null +++ b/src/generated/Models/V1ContainerStateWaiting.cs @@ -0,0 +1,56 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ContainerStateWaiting is a waiting state of a container. + /// + public partial class V1ContainerStateWaiting + { + /// + /// Initializes a new instance of the V1ContainerStateWaiting class. + /// + public V1ContainerStateWaiting() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ContainerStateWaiting class. + /// + /// Message regarding why the container is not + /// yet running. + /// (brief) reason the container is not yet + /// running. + public V1ContainerStateWaiting(string message = default(string), string reason = default(string)) + { + Message = message; + Reason = reason; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets message regarding why the container is not yet + /// running. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets (brief) reason the container is not yet running. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + } +} diff --git a/src/generated/Models/V1ContainerStatus.cs b/src/generated/Models/V1ContainerStatus.cs new file mode 100755 index 000000000..f7c78cf09 --- /dev/null +++ b/src/generated/Models/V1ContainerStatus.cs @@ -0,0 +1,153 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ContainerStatus contains details for the current status of this + /// container. + /// + public partial class V1ContainerStatus + { + /// + /// Initializes a new instance of the V1ContainerStatus class. + /// + public V1ContainerStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ContainerStatus class. + /// + /// The image the container is running. More info: + /// http://kubernetes.io/docs/user-guide/images + /// ImageID of the container's image. + /// This must be a DNS_LABEL. Each container in a + /// pod must have a unique name. Cannot be updated. + /// Specifies whether the container has passed its + /// readiness probe. + /// The number of times the container has + /// been restarted, currently based on the number of dead containers + /// that have not yet been removed. Note that this is calculated from + /// dead containers. But those containers are subject to garbage + /// collection. This value will get capped at 5 by GC. + /// Container's ID in the format + /// 'docker://<container_id>'. More info: + /// http://kubernetes.io/docs/user-guide/container-environment#container-information + /// Details about the container's last + /// termination condition. + /// Details about the container's current + /// condition. + public V1ContainerStatus(string image, string imageID, string name, bool ready, int restartCount, string containerID = default(string), V1ContainerState lastState = default(V1ContainerState), V1ContainerState state = default(V1ContainerState)) + { + ContainerID = containerID; + Image = image; + ImageID = imageID; + LastState = lastState; + Name = name; + Ready = ready; + RestartCount = restartCount; + State = state; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets container's ID in the format + /// 'docker://&lt;container_id&gt;'. More info: + /// http://kubernetes.io/docs/user-guide/container-environment#container-information + /// + [JsonProperty(PropertyName = "containerID")] + public string ContainerID { get; set; } + + /// + /// Gets or sets the image the container is running. More info: + /// http://kubernetes.io/docs/user-guide/images + /// + [JsonProperty(PropertyName = "image")] + public string Image { get; set; } + + /// + /// Gets or sets imageID of the container's image. + /// + [JsonProperty(PropertyName = "imageID")] + public string ImageID { get; set; } + + /// + /// Gets or sets details about the container's last termination + /// condition. + /// + [JsonProperty(PropertyName = "lastState")] + public V1ContainerState LastState { get; set; } + + /// + /// Gets or sets this must be a DNS_LABEL. Each container in a pod must + /// have a unique name. Cannot be updated. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets specifies whether the container has passed its + /// readiness probe. + /// + [JsonProperty(PropertyName = "ready")] + public bool Ready { get; set; } + + /// + /// Gets or sets the number of times the container has been restarted, + /// currently based on the number of dead containers that have not yet + /// been removed. Note that this is calculated from dead containers. + /// But those containers are subject to garbage collection. This value + /// will get capped at 5 by GC. + /// + [JsonProperty(PropertyName = "restartCount")] + public int RestartCount { get; set; } + + /// + /// Gets or sets details about the container's current condition. + /// + [JsonProperty(PropertyName = "state")] + public V1ContainerState State { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Image == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Image"); + } + if (ImageID == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ImageID"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (LastState != null) + { + LastState.Validate(); + } + if (State != null) + { + State.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1CrossVersionObjectReference.cs b/src/generated/Models/V1CrossVersionObjectReference.cs new file mode 100755 index 000000000..3018deb47 --- /dev/null +++ b/src/generated/Models/V1CrossVersionObjectReference.cs @@ -0,0 +1,86 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// CrossVersionObjectReference contains enough information to let you + /// identify the referred resource. + /// + public partial class V1CrossVersionObjectReference + { + /// + /// Initializes a new instance of the V1CrossVersionObjectReference + /// class. + /// + public V1CrossVersionObjectReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1CrossVersionObjectReference + /// class. + /// + /// Kind of the referent; More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + /// Name of the referent; More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// API version of the referent + public V1CrossVersionObjectReference(string kind, string name, string apiVersion = default(string)) + { + ApiVersion = apiVersion; + Kind = kind; + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets API version of the referent + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind of the referent; More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets name of the referent; More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Kind == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/src/generated/Models/V1DaemonEndpoint.cs b/src/generated/Models/V1DaemonEndpoint.cs new file mode 100755 index 000000000..05eaf5c12 --- /dev/null +++ b/src/generated/Models/V1DaemonEndpoint.cs @@ -0,0 +1,55 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// DaemonEndpoint contains information about a single Daemon endpoint. + /// + public partial class V1DaemonEndpoint + { + /// + /// Initializes a new instance of the V1DaemonEndpoint class. + /// + public V1DaemonEndpoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1DaemonEndpoint class. + /// + /// Port number of the given endpoint. + public V1DaemonEndpoint(int port) + { + Port = port; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets port number of the given endpoint. + /// + [JsonProperty(PropertyName = "Port")] + public int Port { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1DeleteOptions.cs b/src/generated/Models/V1DeleteOptions.cs new file mode 100755 index 000000000..53f79a676 --- /dev/null +++ b/src/generated/Models/V1DeleteOptions.cs @@ -0,0 +1,129 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// DeleteOptions may be provided when deleting an API object. + /// + public partial class V1DeleteOptions + { + /// + /// Initializes a new instance of the V1DeleteOptions class. + /// + public V1DeleteOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1DeleteOptions class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// The duration in seconds before the + /// object should be deleted. Value must be non-negative integer. The + /// value zero indicates delete immediately. If this value is nil, the + /// default grace period for the specified type will be used. Defaults + /// to a per object value if not specified. zero means delete + /// immediately. + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Deprecated: please use the + /// PropagationPolicy, this field will be deprecated in 1.7. Should the + /// dependent objects be orphaned. If true/false, the "orphan" + /// finalizer will be added to/removed from the object's finalizers + /// list. Either this field or PropagationPolicy may be set, but not + /// both. + /// Must be fulfilled before a deletion is + /// carried out. If not possible, a 409 Conflict status will be + /// returned. + /// Whether and how garbage collection + /// will be performed. Either this field or OrphanDependents may be + /// set, but not both. The default policy is decided by the existing + /// finalizer set in the metadata.finalizers and the resource-specific + /// default policy. + public V1DeleteOptions(string apiVersion = default(string), long? gracePeriodSeconds = default(long?), string kind = default(string), bool? orphanDependents = default(bool?), V1Preconditions preconditions = default(V1Preconditions), string propagationPolicy = default(string)) + { + ApiVersion = apiVersion; + GracePeriodSeconds = gracePeriodSeconds; + Kind = kind; + OrphanDependents = orphanDependents; + Preconditions = preconditions; + PropagationPolicy = propagationPolicy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets the duration in seconds before the object should be + /// deleted. Value must be non-negative integer. The value zero + /// indicates delete immediately. If this value is nil, the default + /// grace period for the specified type will be used. Defaults to a per + /// object value if not specified. zero means delete immediately. + /// + [JsonProperty(PropertyName = "gracePeriodSeconds")] + public long? GracePeriodSeconds { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets deprecated: please use the PropagationPolicy, this + /// field will be deprecated in 1.7. Should the dependent objects be + /// orphaned. If true/false, the "orphan" finalizer will be added + /// to/removed from the object's finalizers list. Either this field or + /// PropagationPolicy may be set, but not both. + /// + [JsonProperty(PropertyName = "orphanDependents")] + public bool? OrphanDependents { get; set; } + + /// + /// Gets or sets must be fulfilled before a deletion is carried out. If + /// not possible, a 409 Conflict status will be returned. + /// + [JsonProperty(PropertyName = "preconditions")] + public V1Preconditions Preconditions { get; set; } + + /// + /// Gets or sets whether and how garbage collection will be performed. + /// Either this field or OrphanDependents may be set, but not both. The + /// default policy is decided by the existing finalizer set in the + /// metadata.finalizers and the resource-specific default policy. + /// + [JsonProperty(PropertyName = "propagationPolicy")] + public string PropagationPolicy { get; set; } + + } +} diff --git a/src/generated/Models/V1DownwardAPIProjection.cs b/src/generated/Models/V1DownwardAPIProjection.cs new file mode 100755 index 000000000..8d10155ff --- /dev/null +++ b/src/generated/Models/V1DownwardAPIProjection.cs @@ -0,0 +1,50 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Represents downward API info for projecting into a projected volume. + /// Note that this is identical to a downwardAPI volume source without the + /// default mode. + /// + public partial class V1DownwardAPIProjection + { + /// + /// Initializes a new instance of the V1DownwardAPIProjection class. + /// + public V1DownwardAPIProjection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1DownwardAPIProjection class. + /// + /// Items is a list of DownwardAPIVolume + /// file + public V1DownwardAPIProjection(IList items = default(IList)) + { + Items = items; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets items is a list of DownwardAPIVolume file + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + } +} diff --git a/src/generated/Models/V1DownwardAPIVolumeFile.cs b/src/generated/Models/V1DownwardAPIVolumeFile.cs new file mode 100755 index 000000000..bc34cc123 --- /dev/null +++ b/src/generated/Models/V1DownwardAPIVolumeFile.cs @@ -0,0 +1,112 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// DownwardAPIVolumeFile represents information to create the file + /// containing the pod field + /// + public partial class V1DownwardAPIVolumeFile + { + /// + /// Initializes a new instance of the V1DownwardAPIVolumeFile class. + /// + public V1DownwardAPIVolumeFile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1DownwardAPIVolumeFile class. + /// + /// Required: Path is the relative path name of the + /// file to be created. Must not be absolute or contain the '..' path. + /// Must be utf-8 encoded. The first item of the relative path must not + /// start with '..' + /// Required: Selects a field of the pod: only + /// annotations, labels, name and namespace are supported. + /// Optional: mode bits to use on this file, must be + /// a value between 0 and 0777. If not specified, the volume + /// defaultMode will be used. This might be in conflict with other + /// options that affect the file mode, like fsGroup, and the result can + /// be other mode bits set. + /// Selects a resource of the container: + /// only resources limits and requests (limits.cpu, limits.memory, + /// requests.cpu and requests.memory) are currently supported. + public V1DownwardAPIVolumeFile(string path, V1ObjectFieldSelector fieldRef = default(V1ObjectFieldSelector), int? mode = default(int?), V1ResourceFieldSelector resourceFieldRef = default(V1ResourceFieldSelector)) + { + FieldRef = fieldRef; + Mode = mode; + Path = path; + ResourceFieldRef = resourceFieldRef; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets required: Selects a field of the pod: only + /// annotations, labels, name and namespace are supported. + /// + [JsonProperty(PropertyName = "fieldRef")] + public V1ObjectFieldSelector FieldRef { get; set; } + + /// + /// Gets or sets optional: mode bits to use on this file, must be a + /// value between 0 and 0777. If not specified, the volume defaultMode + /// will be used. This might be in conflict with other options that + /// affect the file mode, like fsGroup, and the result can be other + /// mode bits set. + /// + [JsonProperty(PropertyName = "mode")] + public int? Mode { get; set; } + + /// + /// Gets or sets required: Path is the relative path name of the file + /// to be created. Must not be absolute or contain the '..' path. Must + /// be utf-8 encoded. The first item of the relative path must not + /// start with '..' + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or sets selects a resource of the container: only resources + /// limits and requests (limits.cpu, limits.memory, requests.cpu and + /// requests.memory) are currently supported. + /// + [JsonProperty(PropertyName = "resourceFieldRef")] + public V1ResourceFieldSelector ResourceFieldRef { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + } + if (FieldRef != null) + { + FieldRef.Validate(); + } + if (ResourceFieldRef != null) + { + ResourceFieldRef.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1DownwardAPIVolumeSource.cs b/src/generated/Models/V1DownwardAPIVolumeSource.cs new file mode 100755 index 000000000..4a092b82a --- /dev/null +++ b/src/generated/Models/V1DownwardAPIVolumeSource.cs @@ -0,0 +1,67 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DownwardAPIVolumeSource represents a volume containing downward API + /// info. Downward API volumes support ownership management and SELinux + /// relabeling. + /// + public partial class V1DownwardAPIVolumeSource + { + /// + /// Initializes a new instance of the V1DownwardAPIVolumeSource class. + /// + public V1DownwardAPIVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1DownwardAPIVolumeSource class. + /// + /// Optional: mode bits to use on created + /// files by default. Must be a value between 0 and 0777. Defaults to + /// 0644. Directories within the path are not affected by this setting. + /// This might be in conflict with other options that affect the file + /// mode, like fsGroup, and the result can be other mode bits + /// set. + /// Items is a list of downward API volume + /// file + public V1DownwardAPIVolumeSource(int? defaultMode = default(int?), IList items = default(IList)) + { + DefaultMode = defaultMode; + Items = items; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets optional: mode bits to use on created files by + /// default. Must be a value between 0 and 0777. Defaults to 0644. + /// Directories within the path are not affected by this setting. This + /// might be in conflict with other options that affect the file mode, + /// like fsGroup, and the result can be other mode bits set. + /// + [JsonProperty(PropertyName = "defaultMode")] + public int? DefaultMode { get; set; } + + /// + /// Gets or sets items is a list of downward API volume file + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + } +} diff --git a/src/generated/Models/V1EmptyDirVolumeSource.cs b/src/generated/Models/V1EmptyDirVolumeSource.cs new file mode 100755 index 000000000..1d6347761 --- /dev/null +++ b/src/generated/Models/V1EmptyDirVolumeSource.cs @@ -0,0 +1,52 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents an empty directory for a pod. Empty directory volumes + /// support ownership management and SELinux relabeling. + /// + public partial class V1EmptyDirVolumeSource + { + /// + /// Initializes a new instance of the V1EmptyDirVolumeSource class. + /// + public V1EmptyDirVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1EmptyDirVolumeSource class. + /// + /// What type of storage medium should back this + /// directory. The default is "" which means to use the node's default + /// medium. Must be an empty string (default) or Memory. More info: + /// http://kubernetes.io/docs/user-guide/volumes#emptydir + public V1EmptyDirVolumeSource(string medium = default(string)) + { + Medium = medium; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets what type of storage medium should back this + /// directory. The default is "" which means to use the node's default + /// medium. Must be an empty string (default) or Memory. More info: + /// http://kubernetes.io/docs/user-guide/volumes#emptydir + /// + [JsonProperty(PropertyName = "medium")] + public string Medium { get; set; } + + } +} diff --git a/src/generated/Models/V1EndpointAddress.cs b/src/generated/Models/V1EndpointAddress.cs new file mode 100755 index 000000000..db359047f --- /dev/null +++ b/src/generated/Models/V1EndpointAddress.cs @@ -0,0 +1,94 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// EndpointAddress is a tuple that describes single IP address. + /// + public partial class V1EndpointAddress + { + /// + /// Initializes a new instance of the V1EndpointAddress class. + /// + public V1EndpointAddress() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1EndpointAddress class. + /// + /// The IP of this endpoint. May not be loopback + /// (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast + /// ((224.0.0.0/24). IPv6 is also accepted but not fully supported on + /// all platforms. Also, certain kubernetes components, like + /// kube-proxy, are not IPv6 ready. + /// The Hostname of this endpoint + /// Optional: Node hosting this endpoint. This + /// can be used to determine endpoints local to a node. + /// Reference to object providing the + /// endpoint. + public V1EndpointAddress(string ip, string hostname = default(string), string nodeName = default(string), V1ObjectReference targetRef = default(V1ObjectReference)) + { + Hostname = hostname; + Ip = ip; + NodeName = nodeName; + TargetRef = targetRef; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Hostname of this endpoint + /// + [JsonProperty(PropertyName = "hostname")] + public string Hostname { get; set; } + + /// + /// Gets or sets the IP of this endpoint. May not be loopback + /// (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast + /// ((224.0.0.0/24). IPv6 is also accepted but not fully supported on + /// all platforms. Also, certain kubernetes components, like + /// kube-proxy, are not IPv6 ready. + /// + [JsonProperty(PropertyName = "ip")] + public string Ip { get; set; } + + /// + /// Gets or sets optional: Node hosting this endpoint. This can be used + /// to determine endpoints local to a node. + /// + [JsonProperty(PropertyName = "nodeName")] + public string NodeName { get; set; } + + /// + /// Gets or sets reference to object providing the endpoint. + /// + [JsonProperty(PropertyName = "targetRef")] + public V1ObjectReference TargetRef { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Ip == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Ip"); + } + } + } +} diff --git a/src/generated/Models/V1EndpointPort.cs b/src/generated/Models/V1EndpointPort.cs new file mode 100755 index 000000000..6f280ed8f --- /dev/null +++ b/src/generated/Models/V1EndpointPort.cs @@ -0,0 +1,77 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// EndpointPort is a tuple that describes a single port. + /// + public partial class V1EndpointPort + { + /// + /// Initializes a new instance of the V1EndpointPort class. + /// + public V1EndpointPort() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1EndpointPort class. + /// + /// The port number of the endpoint. + /// The name of this port (corresponds to + /// ServicePort.Name). Must be a DNS_LABEL. Optional only if one port + /// is defined. + /// The IP protocol for this port. Must be UDP + /// or TCP. Default is TCP. + public V1EndpointPort(int port, string name = default(string), string protocol = default(string)) + { + Name = name; + Port = port; + Protocol = protocol; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of this port (corresponds to + /// ServicePort.Name). Must be a DNS_LABEL. Optional only if one port + /// is defined. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the port number of the endpoint. + /// + [JsonProperty(PropertyName = "port")] + public int Port { get; set; } + + /// + /// Gets or sets the IP protocol for this port. Must be UDP or TCP. + /// Default is TCP. + /// + [JsonProperty(PropertyName = "protocol")] + public string Protocol { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1EndpointSubset.cs b/src/generated/Models/V1EndpointSubset.cs new file mode 100755 index 000000000..7fcd1e109 --- /dev/null +++ b/src/generated/Models/V1EndpointSubset.cs @@ -0,0 +1,83 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// EndpointSubset is a group of addresses with a common set of ports. The + /// expanded set of endpoints is the Cartesian product of Addresses x + /// Ports. For example, given: + /// { + /// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], + /// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] + /// } + /// The resulting set of endpoints can be viewed as: + /// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], + /// b: [ 10.10.1.1:309, 10.10.2.2:309 ] + /// + public partial class V1EndpointSubset + { + /// + /// Initializes a new instance of the V1EndpointSubset class. + /// + public V1EndpointSubset() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1EndpointSubset class. + /// + /// IP addresses which offer the related ports + /// that are marked as ready. These endpoints should be considered safe + /// for load balancers and clients to utilize. + /// IP addresses which offer the + /// related ports but are not currently marked as ready because they + /// have not yet finished starting, have recently failed a readiness + /// check, or have recently failed a liveness check. + /// Port numbers available on the related IP + /// addresses. + public V1EndpointSubset(IList addresses = default(IList), IList notReadyAddresses = default(IList), IList ports = default(IList)) + { + Addresses = addresses; + NotReadyAddresses = notReadyAddresses; + Ports = ports; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets IP addresses which offer the related ports that are + /// marked as ready. These endpoints should be considered safe for load + /// balancers and clients to utilize. + /// + [JsonProperty(PropertyName = "addresses")] + public IList Addresses { get; set; } + + /// + /// Gets or sets IP addresses which offer the related ports but are not + /// currently marked as ready because they have not yet finished + /// starting, have recently failed a readiness check, or have recently + /// failed a liveness check. + /// + [JsonProperty(PropertyName = "notReadyAddresses")] + public IList NotReadyAddresses { get; set; } + + /// + /// Gets or sets port numbers available on the related IP addresses. + /// + [JsonProperty(PropertyName = "ports")] + public IList Ports { get; set; } + + } +} diff --git a/src/generated/Models/V1Endpoints.cs b/src/generated/Models/V1Endpoints.cs new file mode 100755 index 000000000..f53db16a1 --- /dev/null +++ b/src/generated/Models/V1Endpoints.cs @@ -0,0 +1,129 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Endpoints is a collection of endpoints that implement the actual + /// service. Example: + /// Name: "mysvc", + /// Subsets: [ + /// { + /// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], + /// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] + /// }, + /// { + /// Addresses: [{"ip": "10.10.3.3"}], + /// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] + /// }, + /// ] + /// + public partial class V1Endpoints + { + /// + /// Initializes a new instance of the V1Endpoints class. + /// + public V1Endpoints() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Endpoints class. + /// + /// The set of all endpoints is the union of all + /// subsets. Addresses are placed into subsets according to the IPs + /// they share. A single address with multiple ports, some of which are + /// ready and some of which are not (because they come from different + /// containers) will result in the address being displayed in different + /// subsets for the different ports. No address will appear in both + /// Addresses and NotReadyAddresses in the same subset. Sets of + /// addresses and ports that comprise a service. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1Endpoints(IList subsets, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Subsets = subsets; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets the set of all endpoints is the union of all subsets. + /// Addresses are placed into subsets according to the IPs they share. + /// A single address with multiple ports, some of which are ready and + /// some of which are not (because they come from different containers) + /// will result in the address being displayed in different subsets for + /// the different ports. No address will appear in both Addresses and + /// NotReadyAddresses in the same subset. Sets of addresses and ports + /// that comprise a service. + /// + [JsonProperty(PropertyName = "subsets")] + public IList Subsets { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Subsets == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Subsets"); + } + } + } +} diff --git a/src/generated/Models/V1EndpointsList.cs b/src/generated/Models/V1EndpointsList.cs new file mode 100755 index 000000000..3af51b701 --- /dev/null +++ b/src/generated/Models/V1EndpointsList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// EndpointsList is a list of endpoints. + /// + public partial class V1EndpointsList + { + /// + /// Initializes a new instance of the V1EndpointsList class. + /// + public V1EndpointsList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1EndpointsList class. + /// + /// List of endpoints. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1EndpointsList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of endpoints. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1EnvFromSource.cs b/src/generated/Models/V1EnvFromSource.cs new file mode 100755 index 000000000..0138a07d9 --- /dev/null +++ b/src/generated/Models/V1EnvFromSource.cs @@ -0,0 +1,63 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// EnvFromSource represents the source of a set of ConfigMaps + /// + public partial class V1EnvFromSource + { + /// + /// Initializes a new instance of the V1EnvFromSource class. + /// + public V1EnvFromSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1EnvFromSource class. + /// + /// The ConfigMap to select from + /// An optional identifer to prepend to each key + /// in the ConfigMap. Must be a C_IDENTIFIER. + /// The Secret to select from + public V1EnvFromSource(V1ConfigMapEnvSource configMapRef = default(V1ConfigMapEnvSource), string prefix = default(string), V1SecretEnvSource secretRef = default(V1SecretEnvSource)) + { + ConfigMapRef = configMapRef; + Prefix = prefix; + SecretRef = secretRef; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ConfigMap to select from + /// + [JsonProperty(PropertyName = "configMapRef")] + public V1ConfigMapEnvSource ConfigMapRef { get; set; } + + /// + /// Gets or sets an optional identifer to prepend to each key in the + /// ConfigMap. Must be a C_IDENTIFIER. + /// + [JsonProperty(PropertyName = "prefix")] + public string Prefix { get; set; } + + /// + /// Gets or sets the Secret to select from + /// + [JsonProperty(PropertyName = "secretRef")] + public V1SecretEnvSource SecretRef { get; set; } + + } +} diff --git a/src/generated/Models/V1EnvVar.cs b/src/generated/Models/V1EnvVar.cs new file mode 100755 index 000000000..42f76e8ab --- /dev/null +++ b/src/generated/Models/V1EnvVar.cs @@ -0,0 +1,95 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// EnvVar represents an environment variable present in a Container. + /// + public partial class V1EnvVar + { + /// + /// Initializes a new instance of the V1EnvVar class. + /// + public V1EnvVar() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1EnvVar class. + /// + /// Name of the environment variable. Must be a + /// C_IDENTIFIER. + /// Variable references $(VAR_NAME) are expanded + /// using the previous defined environment variables in the container + /// and any service environment variables. If a variable cannot be + /// resolved, the reference in the input string will be unchanged. The + /// $(VAR_NAME) syntax can be escaped with a double $$, ie: + /// $$(VAR_NAME). Escaped references will never be expanded, regardless + /// of whether the variable exists or not. Defaults to "". + /// Source for the environment variable's + /// value. Cannot be used if value is not empty. + public V1EnvVar(string name, string value = default(string), V1EnvVarSource valueFrom = default(V1EnvVarSource)) + { + Name = name; + Value = value; + ValueFrom = valueFrom; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the environment variable. Must be a + /// C_IDENTIFIER. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets variable references $(VAR_NAME) are expanded using the + /// previous defined environment variables in the container and any + /// service environment variables. If a variable cannot be resolved, + /// the reference in the input string will be unchanged. The + /// $(VAR_NAME) syntax can be escaped with a double $$, ie: + /// $$(VAR_NAME). Escaped references will never be expanded, regardless + /// of whether the variable exists or not. Defaults to "". + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Gets or sets source for the environment variable's value. Cannot be + /// used if value is not empty. + /// + [JsonProperty(PropertyName = "valueFrom")] + public V1EnvVarSource ValueFrom { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (ValueFrom != null) + { + ValueFrom.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1EnvVarSource.cs b/src/generated/Models/V1EnvVarSource.cs new file mode 100755 index 000000000..2903c96d0 --- /dev/null +++ b/src/generated/Models/V1EnvVarSource.cs @@ -0,0 +1,104 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// EnvVarSource represents a source for the value of an EnvVar. + /// + public partial class V1EnvVarSource + { + /// + /// Initializes a new instance of the V1EnvVarSource class. + /// + public V1EnvVarSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1EnvVarSource class. + /// + /// Selects a key of a ConfigMap. + /// Selects a field of the pod: supports + /// metadata.name, metadata.namespace, metadata.labels, + /// metadata.annotations, spec.nodeName, spec.serviceAccountName, + /// status.podIP. + /// Selects a resource of the container: + /// only resources limits and requests (limits.cpu, limits.memory, + /// requests.cpu and requests.memory) are currently supported. + /// Selects a key of a secret in the pod's + /// namespace + public V1EnvVarSource(V1ConfigMapKeySelector configMapKeyRef = default(V1ConfigMapKeySelector), V1ObjectFieldSelector fieldRef = default(V1ObjectFieldSelector), V1ResourceFieldSelector resourceFieldRef = default(V1ResourceFieldSelector), V1SecretKeySelector secretKeyRef = default(V1SecretKeySelector)) + { + ConfigMapKeyRef = configMapKeyRef; + FieldRef = fieldRef; + ResourceFieldRef = resourceFieldRef; + SecretKeyRef = secretKeyRef; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets selects a key of a ConfigMap. + /// + [JsonProperty(PropertyName = "configMapKeyRef")] + public V1ConfigMapKeySelector ConfigMapKeyRef { get; set; } + + /// + /// Gets or sets selects a field of the pod: supports metadata.name, + /// metadata.namespace, metadata.labels, metadata.annotations, + /// spec.nodeName, spec.serviceAccountName, status.podIP. + /// + [JsonProperty(PropertyName = "fieldRef")] + public V1ObjectFieldSelector FieldRef { get; set; } + + /// + /// Gets or sets selects a resource of the container: only resources + /// limits and requests (limits.cpu, limits.memory, requests.cpu and + /// requests.memory) are currently supported. + /// + [JsonProperty(PropertyName = "resourceFieldRef")] + public V1ResourceFieldSelector ResourceFieldRef { get; set; } + + /// + /// Gets or sets selects a key of a secret in the pod's namespace + /// + [JsonProperty(PropertyName = "secretKeyRef")] + public V1SecretKeySelector SecretKeyRef { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ConfigMapKeyRef != null) + { + ConfigMapKeyRef.Validate(); + } + if (FieldRef != null) + { + FieldRef.Validate(); + } + if (ResourceFieldRef != null) + { + ResourceFieldRef.Validate(); + } + if (SecretKeyRef != null) + { + SecretKeyRef.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1Event.cs b/src/generated/Models/V1Event.cs new file mode 100755 index 000000000..464f3d07a --- /dev/null +++ b/src/generated/Models/V1Event.cs @@ -0,0 +1,177 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Event is a report of an event somewhere in the cluster. + /// + public partial class V1Event + { + /// + /// Initializes a new instance of the V1Event class. + /// + public V1Event() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Event class. + /// + /// The object that this event is + /// about. + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// The number of times this event has + /// occurred. + /// The time at which the event was first + /// recorded. (Time of server receipt is in TypeMeta.) + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// The time at which the most recent + /// occurrence of this event was recorded. + /// A human-readable description of the status of + /// this operation. + /// This should be a short, machine understandable + /// string that gives the reason for the transition into the object's + /// current status. + /// The component reporting this event. Should be + /// a short machine understandable string. + /// Type of this event (Normal, Warning), new types + /// could be added in the future + public V1Event(V1ObjectReference involvedObject, V1ObjectMeta metadata, string apiVersion = default(string), int? count = default(int?), System.DateTime? firstTimestamp = default(System.DateTime?), string kind = default(string), System.DateTime? lastTimestamp = default(System.DateTime?), string message = default(string), string reason = default(string), V1EventSource source = default(V1EventSource), string type = default(string)) + { + ApiVersion = apiVersion; + Count = count; + FirstTimestamp = firstTimestamp; + InvolvedObject = involvedObject; + Kind = kind; + LastTimestamp = lastTimestamp; + Message = message; + Metadata = metadata; + Reason = reason; + Source = source; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets the number of times this event has occurred. + /// + [JsonProperty(PropertyName = "count")] + public int? Count { get; set; } + + /// + /// Gets or sets the time at which the event was first recorded. (Time + /// of server receipt is in TypeMeta.) + /// + [JsonProperty(PropertyName = "firstTimestamp")] + public System.DateTime? FirstTimestamp { get; set; } + + /// + /// Gets or sets the object that this event is about. + /// + [JsonProperty(PropertyName = "involvedObject")] + public V1ObjectReference InvolvedObject { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets the time at which the most recent occurrence of this + /// event was recorded. + /// + [JsonProperty(PropertyName = "lastTimestamp")] + public System.DateTime? LastTimestamp { get; set; } + + /// + /// Gets or sets a human-readable description of the status of this + /// operation. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets this should be a short, machine understandable string + /// that gives the reason for the transition into the object's current + /// status. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets the component reporting this event. Should be a short + /// machine understandable string. + /// + [JsonProperty(PropertyName = "source")] + public V1EventSource Source { get; set; } + + /// + /// Gets or sets type of this event (Normal, Warning), new types could + /// be added in the future + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (InvolvedObject == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "InvolvedObject"); + } + if (Metadata == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Metadata"); + } + } + } +} diff --git a/src/generated/Models/V1EventList.cs b/src/generated/Models/V1EventList.cs new file mode 100755 index 000000000..43da43533 --- /dev/null +++ b/src/generated/Models/V1EventList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// EventList is a list of events. + /// + public partial class V1EventList + { + /// + /// Initializes a new instance of the V1EventList class. + /// + public V1EventList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1EventList class. + /// + /// List of events + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1EventList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of events + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1EventSource.cs b/src/generated/Models/V1EventSource.cs new file mode 100755 index 000000000..1013f9143 --- /dev/null +++ b/src/generated/Models/V1EventSource.cs @@ -0,0 +1,55 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// EventSource contains information for an event. + /// + public partial class V1EventSource + { + /// + /// Initializes a new instance of the V1EventSource class. + /// + public V1EventSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1EventSource class. + /// + /// Component from which the event is + /// generated. + /// Node name on which the event is + /// generated. + public V1EventSource(string component = default(string), string host = default(string)) + { + Component = component; + Host = host; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets component from which the event is generated. + /// + [JsonProperty(PropertyName = "component")] + public string Component { get; set; } + + /// + /// Gets or sets node name on which the event is generated. + /// + [JsonProperty(PropertyName = "host")] + public string Host { get; set; } + + } +} diff --git a/src/generated/Models/V1ExecAction.cs b/src/generated/Models/V1ExecAction.cs new file mode 100755 index 000000000..b9f4f24d1 --- /dev/null +++ b/src/generated/Models/V1ExecAction.cs @@ -0,0 +1,59 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ExecAction describes a "run in container" action. + /// + public partial class V1ExecAction + { + /// + /// Initializes a new instance of the V1ExecAction class. + /// + public V1ExecAction() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ExecAction class. + /// + /// 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. + public V1ExecAction(IList command = default(IList)) + { + Command = command; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets 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. + /// + [JsonProperty(PropertyName = "command")] + public IList Command { get; set; } + + } +} diff --git a/src/generated/Models/V1FCVolumeSource.cs b/src/generated/Models/V1FCVolumeSource.cs new file mode 100755 index 000000000..fba9d6e77 --- /dev/null +++ b/src/generated/Models/V1FCVolumeSource.cs @@ -0,0 +1,95 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Represents a Fibre Channel volume. Fibre Channel volumes can only be + /// mounted as read/write once. Fibre Channel volumes support ownership + /// management and SELinux relabeling. + /// + public partial class V1FCVolumeSource + { + /// + /// Initializes a new instance of the V1FCVolumeSource class. + /// + public V1FCVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1FCVolumeSource class. + /// + /// Required: FC target lun number + /// Required: FC target worldwide names + /// (WWNs) + /// Filesystem type to mount. Must be a filesystem + /// type supported by the host operating system. Ex. "ext4", "xfs", + /// "ntfs". Implicitly inferred to be "ext4" if unspecified. + /// Optional: Defaults to false + /// (read/write). ReadOnly here will force the ReadOnly setting in + /// VolumeMounts. + public V1FCVolumeSource(int lun, IList targetWWNs, string fsType = default(string), bool? readOnlyProperty = default(bool?)) + { + FsType = fsType; + Lun = lun; + ReadOnlyProperty = readOnlyProperty; + TargetWWNs = targetWWNs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets filesystem type to mount. Must be a filesystem type + /// supported by the host operating system. Ex. "ext4", "xfs", "ntfs". + /// Implicitly inferred to be "ext4" if unspecified. + /// + [JsonProperty(PropertyName = "fsType")] + public string FsType { get; set; } + + /// + /// Gets or sets required: FC target lun number + /// + [JsonProperty(PropertyName = "lun")] + public int Lun { get; set; } + + /// + /// Gets or sets optional: Defaults to false (read/write). ReadOnly + /// here will force the ReadOnly setting in VolumeMounts. + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets required: FC target worldwide names (WWNs) + /// + [JsonProperty(PropertyName = "targetWWNs")] + public IList TargetWWNs { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TargetWWNs == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetWWNs"); + } + } + } +} diff --git a/src/generated/Models/V1FlexVolumeSource.cs b/src/generated/Models/V1FlexVolumeSource.cs new file mode 100755 index 000000000..f06a10aa1 --- /dev/null +++ b/src/generated/Models/V1FlexVolumeSource.cs @@ -0,0 +1,114 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// FlexVolume represents a generic volume resource that is + /// provisioned/attached using an exec based plugin. This is an alpha + /// feature and may change in future. + /// + public partial class V1FlexVolumeSource + { + /// + /// Initializes a new instance of the V1FlexVolumeSource class. + /// + public V1FlexVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1FlexVolumeSource class. + /// + /// Driver is the name of the driver to use for + /// this volume. + /// Filesystem type to mount. Must be a filesystem + /// type supported by the host operating system. Ex. "ext4", "xfs", + /// "ntfs". The default filesystem depends on FlexVolume + /// script. + /// Optional: Extra command options if + /// any. + /// Optional: Defaults to false + /// (read/write). ReadOnly here will force the ReadOnly setting in + /// VolumeMounts. + /// Optional: SecretRef is reference to the + /// secret object containing sensitive information to pass to the + /// plugin scripts. This may be empty if no secret object is specified. + /// If the secret object contains more than one secret, all secrets are + /// passed to the plugin scripts. + public V1FlexVolumeSource(string driver, string fsType = default(string), IDictionary options = default(IDictionary), bool? readOnlyProperty = default(bool?), V1LocalObjectReference secretRef = default(V1LocalObjectReference)) + { + Driver = driver; + FsType = fsType; + Options = options; + ReadOnlyProperty = readOnlyProperty; + SecretRef = secretRef; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets driver is the name of the driver to use for this + /// volume. + /// + [JsonProperty(PropertyName = "driver")] + public string Driver { get; set; } + + /// + /// Gets or sets filesystem type to mount. Must be a filesystem type + /// supported by the host operating system. Ex. "ext4", "xfs", "ntfs". + /// The default filesystem depends on FlexVolume script. + /// + [JsonProperty(PropertyName = "fsType")] + public string FsType { get; set; } + + /// + /// Gets or sets optional: Extra command options if any. + /// + [JsonProperty(PropertyName = "options")] + public IDictionary Options { get; set; } + + /// + /// Gets or sets optional: Defaults to false (read/write). ReadOnly + /// here will force the ReadOnly setting in VolumeMounts. + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets optional: SecretRef is reference to the secret object + /// containing sensitive information to pass to the plugin scripts. + /// This may be empty if no secret object is specified. If the secret + /// object contains more than one secret, all secrets are passed to the + /// plugin scripts. + /// + [JsonProperty(PropertyName = "secretRef")] + public V1LocalObjectReference SecretRef { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Driver == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Driver"); + } + } + } +} diff --git a/src/generated/Models/V1FlockerVolumeSource.cs b/src/generated/Models/V1FlockerVolumeSource.cs new file mode 100755 index 000000000..fb04e8168 --- /dev/null +++ b/src/generated/Models/V1FlockerVolumeSource.cs @@ -0,0 +1,60 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a Flocker volume mounted by the Flocker agent. One and only + /// one of datasetName and datasetUUID should be set. Flocker volumes do + /// not support ownership management or SELinux relabeling. + /// + public partial class V1FlockerVolumeSource + { + /// + /// Initializes a new instance of the V1FlockerVolumeSource class. + /// + public V1FlockerVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1FlockerVolumeSource class. + /// + /// Name of the dataset stored as metadata + /// -> name on the dataset for Flocker should be considered as + /// deprecated + /// UUID of the dataset. This is unique + /// identifier of a Flocker dataset + public V1FlockerVolumeSource(string datasetName = default(string), string datasetUUID = default(string)) + { + DatasetName = datasetName; + DatasetUUID = datasetUUID; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the dataset stored as metadata -&gt; name + /// on the dataset for Flocker should be considered as deprecated + /// + [JsonProperty(PropertyName = "datasetName")] + public string DatasetName { get; set; } + + /// + /// Gets or sets UUID of the dataset. This is unique identifier of a + /// Flocker dataset + /// + [JsonProperty(PropertyName = "datasetUUID")] + public string DatasetUUID { get; set; } + + } +} diff --git a/src/generated/Models/V1GCEPersistentDiskVolumeSource.cs b/src/generated/Models/V1GCEPersistentDiskVolumeSource.cs new file mode 100755 index 000000000..bbbd90e9d --- /dev/null +++ b/src/generated/Models/V1GCEPersistentDiskVolumeSource.cs @@ -0,0 +1,116 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a Persistent Disk resource in Google Compute Engine. + /// + /// A GCE PD must exist before mounting to a container. The disk must also + /// be in the same GCE project and zone as the kubelet. A GCE PD can only + /// be mounted as read/write once or read-only many times. GCE PDs support + /// ownership management and SELinux relabeling. + /// + public partial class V1GCEPersistentDiskVolumeSource + { + /// + /// Initializes a new instance of the V1GCEPersistentDiskVolumeSource + /// class. + /// + public V1GCEPersistentDiskVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1GCEPersistentDiskVolumeSource + /// class. + /// + /// Unique name of the PD resource in GCE. Used to + /// identify the disk in GCE. More info: + /// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + /// Filesystem type of the volume that you want to + /// mount. Tip: Ensure that the filesystem type is supported by the + /// host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly + /// inferred to be "ext4" if unspecified. More info: + /// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + /// The partition in the volume that you want + /// to mount. If omitted, the default is to mount by volume name. + /// Examples: For volume /dev/sda1, you specify the partition as "1". + /// Similarly, the volume partition for /dev/sda is "0" (or you can + /// leave the property empty). More info: + /// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + /// ReadOnly here will force the + /// ReadOnly setting in VolumeMounts. Defaults to false. More info: + /// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + public V1GCEPersistentDiskVolumeSource(string pdName, string fsType = default(string), int? partition = default(int?), bool? readOnlyProperty = default(bool?)) + { + FsType = fsType; + Partition = partition; + PdName = pdName; + ReadOnlyProperty = readOnlyProperty; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets filesystem type of the volume that you want to mount. + /// Tip: Ensure that the filesystem type is supported by the host + /// operating system. Examples: "ext4", "xfs", "ntfs". Implicitly + /// inferred to be "ext4" if unspecified. More info: + /// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + /// + [JsonProperty(PropertyName = "fsType")] + public string FsType { get; set; } + + /// + /// Gets or sets the partition in the volume that you want to mount. If + /// omitted, the default is to mount by volume name. Examples: For + /// volume /dev/sda1, you specify the partition as "1". Similarly, the + /// volume partition for /dev/sda is "0" (or you can leave the property + /// empty). More info: + /// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + /// + [JsonProperty(PropertyName = "partition")] + public int? Partition { get; set; } + + /// + /// Gets or sets unique name of the PD resource in GCE. Used to + /// identify the disk in GCE. More info: + /// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + /// + [JsonProperty(PropertyName = "pdName")] + public string PdName { get; set; } + + /// + /// Gets or sets readOnly here will force the ReadOnly setting in + /// VolumeMounts. Defaults to false. More info: + /// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PdName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PdName"); + } + } + } +} diff --git a/src/generated/Models/V1GitRepoVolumeSource.cs b/src/generated/Models/V1GitRepoVolumeSource.cs new file mode 100755 index 000000000..c5bcb818a --- /dev/null +++ b/src/generated/Models/V1GitRepoVolumeSource.cs @@ -0,0 +1,85 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a volume that is populated with the contents of a git + /// repository. Git repo volumes do not support ownership management. Git + /// repo volumes support SELinux relabeling. + /// + public partial class V1GitRepoVolumeSource + { + /// + /// Initializes a new instance of the V1GitRepoVolumeSource class. + /// + public V1GitRepoVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1GitRepoVolumeSource class. + /// + /// Repository URL + /// Target directory name. Must not contain or + /// start with '..'. If '.' is supplied, the volume directory will be + /// the git repository. Otherwise, if specified, the volume will + /// contain the git repository in the subdirectory with the given + /// name. + /// Commit hash for the specified + /// revision. + public V1GitRepoVolumeSource(string repository, string directory = default(string), string revision = default(string)) + { + Directory = directory; + Repository = repository; + Revision = revision; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets target directory name. Must not contain or start with + /// '..'. If '.' is supplied, the volume directory will be the git + /// repository. Otherwise, if specified, the volume will contain the + /// git repository in the subdirectory with the given name. + /// + [JsonProperty(PropertyName = "directory")] + public string Directory { get; set; } + + /// + /// Gets or sets repository URL + /// + [JsonProperty(PropertyName = "repository")] + public string Repository { get; set; } + + /// + /// Gets or sets commit hash for the specified revision. + /// + [JsonProperty(PropertyName = "revision")] + public string Revision { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Repository == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Repository"); + } + } + } +} diff --git a/src/generated/Models/V1GlusterfsVolumeSource.cs b/src/generated/Models/V1GlusterfsVolumeSource.cs new file mode 100755 index 000000000..1dca2bcb7 --- /dev/null +++ b/src/generated/Models/V1GlusterfsVolumeSource.cs @@ -0,0 +1,92 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a Glusterfs mount that lasts the lifetime of a pod. + /// Glusterfs volumes do not support ownership management or SELinux + /// relabeling. + /// + public partial class V1GlusterfsVolumeSource + { + /// + /// Initializes a new instance of the V1GlusterfsVolumeSource class. + /// + public V1GlusterfsVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1GlusterfsVolumeSource class. + /// + /// EndpointsName is the endpoint name that + /// details Glusterfs topology. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + /// Path is the Glusterfs volume path. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + /// ReadOnly here will force the + /// Glusterfs volume to be mounted with read-only permissions. Defaults + /// to false. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + public V1GlusterfsVolumeSource(string endpoints, string path, bool? readOnlyProperty = default(bool?)) + { + Endpoints = endpoints; + Path = path; + ReadOnlyProperty = readOnlyProperty; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets endpointsName is the endpoint name that details + /// Glusterfs topology. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + /// + [JsonProperty(PropertyName = "endpoints")] + public string Endpoints { get; set; } + + /// + /// Gets or sets path is the Glusterfs volume path. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or sets readOnly here will force the Glusterfs volume to be + /// mounted with read-only permissions. Defaults to false. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Endpoints == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Endpoints"); + } + if (Path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + } + } + } +} diff --git a/src/generated/Models/V1GroupVersionForDiscovery.cs b/src/generated/Models/V1GroupVersionForDiscovery.cs new file mode 100755 index 000000000..716890811 --- /dev/null +++ b/src/generated/Models/V1GroupVersionForDiscovery.cs @@ -0,0 +1,78 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// GroupVersion contains the "group/version" and "version" string of a + /// version. It is made a struct to keep extensibility. + /// + public partial class V1GroupVersionForDiscovery + { + /// + /// Initializes a new instance of the V1GroupVersionForDiscovery class. + /// + public V1GroupVersionForDiscovery() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1GroupVersionForDiscovery class. + /// + /// groupVersion specifies the API group and + /// version in the form "group/version" + /// version specifies the version in the form of + /// "version". This is to save the clients the trouble of splitting the + /// GroupVersion. + public V1GroupVersionForDiscovery(string groupVersion, string version) + { + GroupVersion = groupVersion; + Version = version; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets groupVersion specifies the API group and version in + /// the form "group/version" + /// + [JsonProperty(PropertyName = "groupVersion")] + public string GroupVersion { get; set; } + + /// + /// Gets or sets version specifies the version in the form of + /// "version". This is to save the clients the trouble of splitting the + /// GroupVersion. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (GroupVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "GroupVersion"); + } + if (Version == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Version"); + } + } + } +} diff --git a/src/generated/Models/V1HTTPGetAction.cs b/src/generated/Models/V1HTTPGetAction.cs new file mode 100755 index 000000000..c999029ab --- /dev/null +++ b/src/generated/Models/V1HTTPGetAction.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HTTPGetAction describes an action based on HTTP Get requests. + /// + public partial class V1HTTPGetAction + { + /// + /// Initializes a new instance of the V1HTTPGetAction class. + /// + public V1HTTPGetAction() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1HTTPGetAction class. + /// + /// Name or number of the port to access on the + /// container. Number must be in the range 1 to 65535. Name must be an + /// IANA_SVC_NAME. + /// Host name to connect to, defaults to the pod IP. + /// You probably want to set "Host" in httpHeaders instead. + /// Custom headers to set in the request. + /// HTTP allows repeated headers. + /// Path to access on the HTTP server. + /// Scheme to use for connecting to the host. + /// Defaults to HTTP. + public V1HTTPGetAction(string port, string host = default(string), IList httpHeaders = default(IList), string path = default(string), string scheme = default(string)) + { + Host = host; + HttpHeaders = httpHeaders; + Path = path; + Port = port; + Scheme = scheme; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets host name to connect to, defaults to the pod IP. You + /// probably want to set "Host" in httpHeaders instead. + /// + [JsonProperty(PropertyName = "host")] + public string Host { get; set; } + + /// + /// Gets or sets custom headers to set in the request. HTTP allows + /// repeated headers. + /// + [JsonProperty(PropertyName = "httpHeaders")] + public IList HttpHeaders { get; set; } + + /// + /// Gets or sets path to access on the HTTP server. + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or sets name or number of the port to access on the container. + /// Number must be in the range 1 to 65535. Name must be an + /// IANA_SVC_NAME. + /// + [JsonProperty(PropertyName = "port")] + public string Port { get; set; } + + /// + /// Gets or sets scheme to use for connecting to the host. Defaults to + /// HTTP. + /// + [JsonProperty(PropertyName = "scheme")] + public string Scheme { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Port == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Port"); + } + if (HttpHeaders != null) + { + foreach (var element in HttpHeaders) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1HTTPHeader.cs b/src/generated/Models/V1HTTPHeader.cs new file mode 100755 index 000000000..b100f4ebd --- /dev/null +++ b/src/generated/Models/V1HTTPHeader.cs @@ -0,0 +1,71 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// HTTPHeader describes a custom header to be used in HTTP probes + /// + public partial class V1HTTPHeader + { + /// + /// Initializes a new instance of the V1HTTPHeader class. + /// + public V1HTTPHeader() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1HTTPHeader class. + /// + /// The header field name + /// The header field value + public V1HTTPHeader(string name, string value) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the header field name + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the header field value + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/src/generated/Models/V1Handler.cs b/src/generated/Models/V1Handler.cs new file mode 100755 index 000000000..cb88ee210 --- /dev/null +++ b/src/generated/Models/V1Handler.cs @@ -0,0 +1,83 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Handler defines a specific action that should be taken + /// + public partial class V1Handler + { + /// + /// Initializes a new instance of the V1Handler class. + /// + public V1Handler() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Handler class. + /// + /// One and only one of the following should be + /// specified. Exec specifies the action to take. + /// HTTPGet specifies the http request to + /// perform. + /// TCPSocket specifies an action involving a + /// TCP port. TCP hooks not yet supported + public V1Handler(V1ExecAction exec = default(V1ExecAction), V1HTTPGetAction httpGet = default(V1HTTPGetAction), V1TCPSocketAction tcpSocket = default(V1TCPSocketAction)) + { + Exec = exec; + HttpGet = httpGet; + TcpSocket = tcpSocket; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets one and only one of the following should be specified. + /// Exec specifies the action to take. + /// + [JsonProperty(PropertyName = "exec")] + public V1ExecAction Exec { get; set; } + + /// + /// Gets or sets hTTPGet specifies the http request to perform. + /// + [JsonProperty(PropertyName = "httpGet")] + public V1HTTPGetAction HttpGet { get; set; } + + /// + /// Gets or sets tCPSocket specifies an action involving a TCP port. + /// TCP hooks not yet supported + /// + [JsonProperty(PropertyName = "tcpSocket")] + public V1TCPSocketAction TcpSocket { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (HttpGet != null) + { + HttpGet.Validate(); + } + if (TcpSocket != null) + { + TcpSocket.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1HorizontalPodAutoscaler.cs b/src/generated/Models/V1HorizontalPodAutoscaler.cs new file mode 100755 index 000000000..ec9987e0f --- /dev/null +++ b/src/generated/Models/V1HorizontalPodAutoscaler.cs @@ -0,0 +1,115 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// configuration of a horizontal pod autoscaler. + /// + public partial class V1HorizontalPodAutoscaler + { + /// + /// Initializes a new instance of the V1HorizontalPodAutoscaler class. + /// + public V1HorizontalPodAutoscaler() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1HorizontalPodAutoscaler class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// behaviour of autoscaler. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// current information about the + /// autoscaler. + public V1HorizontalPodAutoscaler(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1HorizontalPodAutoscalerSpec spec = default(V1HorizontalPodAutoscalerSpec), V1HorizontalPodAutoscalerStatus status = default(V1HorizontalPodAutoscalerStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets behaviour of autoscaler. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// + [JsonProperty(PropertyName = "spec")] + public V1HorizontalPodAutoscalerSpec Spec { get; set; } + + /// + /// Gets or sets current information about the autoscaler. + /// + [JsonProperty(PropertyName = "status")] + public V1HorizontalPodAutoscalerStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1HorizontalPodAutoscalerList.cs b/src/generated/Models/V1HorizontalPodAutoscalerList.cs new file mode 100755 index 000000000..6eff56efe --- /dev/null +++ b/src/generated/Models/V1HorizontalPodAutoscalerList.cs @@ -0,0 +1,114 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// list of horizontal pod autoscaler objects. + /// + public partial class V1HorizontalPodAutoscalerList + { + /// + /// Initializes a new instance of the V1HorizontalPodAutoscalerList + /// class. + /// + public V1HorizontalPodAutoscalerList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1HorizontalPodAutoscalerList + /// class. + /// + /// list of horizontal pod autoscaler + /// objects. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. + public V1HorizontalPodAutoscalerList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of horizontal pod autoscaler objects. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1HorizontalPodAutoscalerSpec.cs b/src/generated/Models/V1HorizontalPodAutoscalerSpec.cs new file mode 100755 index 000000000..03f6493d4 --- /dev/null +++ b/src/generated/Models/V1HorizontalPodAutoscalerSpec.cs @@ -0,0 +1,104 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// specification of a horizontal pod autoscaler. + /// + public partial class V1HorizontalPodAutoscalerSpec + { + /// + /// Initializes a new instance of the V1HorizontalPodAutoscalerSpec + /// class. + /// + public V1HorizontalPodAutoscalerSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1HorizontalPodAutoscalerSpec + /// class. + /// + /// upper limit for the number of pods that + /// can be set by the autoscaler; cannot be smaller than + /// MinReplicas. + /// reference to scaled resource; + /// horizontal pod autoscaler will learn the current resource + /// consumption and will set the desired number of pods by using its + /// Scale subresource. + /// lower limit for the number of pods that + /// can be set by the autoscaler, default 1. + /// target average CPU + /// utilization (represented as a percentage of requested CPU) over all + /// the pods; if not specified the default autoscaling policy will be + /// used. + public V1HorizontalPodAutoscalerSpec(int maxReplicas, V1CrossVersionObjectReference scaleTargetRef, int? minReplicas = default(int?), int? targetCPUUtilizationPercentage = default(int?)) + { + MaxReplicas = maxReplicas; + MinReplicas = minReplicas; + ScaleTargetRef = scaleTargetRef; + TargetCPUUtilizationPercentage = targetCPUUtilizationPercentage; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets upper limit for the number of pods that can be set by + /// the autoscaler; cannot be smaller than MinReplicas. + /// + [JsonProperty(PropertyName = "maxReplicas")] + public int MaxReplicas { get; set; } + + /// + /// Gets or sets lower limit for the number of pods that can be set by + /// the autoscaler, default 1. + /// + [JsonProperty(PropertyName = "minReplicas")] + public int? MinReplicas { get; set; } + + /// + /// Gets or sets reference to scaled resource; horizontal pod + /// autoscaler will learn the current resource consumption and will set + /// the desired number of pods by using its Scale subresource. + /// + [JsonProperty(PropertyName = "scaleTargetRef")] + public V1CrossVersionObjectReference ScaleTargetRef { get; set; } + + /// + /// Gets or sets target average CPU utilization (represented as a + /// percentage of requested CPU) over all the pods; if not specified + /// the default autoscaling policy will be used. + /// + [JsonProperty(PropertyName = "targetCPUUtilizationPercentage")] + public int? TargetCPUUtilizationPercentage { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ScaleTargetRef == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ScaleTargetRef"); + } + if (ScaleTargetRef != null) + { + ScaleTargetRef.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1HorizontalPodAutoscalerStatus.cs b/src/generated/Models/V1HorizontalPodAutoscalerStatus.cs new file mode 100755 index 000000000..708d7df35 --- /dev/null +++ b/src/generated/Models/V1HorizontalPodAutoscalerStatus.cs @@ -0,0 +1,103 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// current status of a horizontal pod autoscaler + /// + public partial class V1HorizontalPodAutoscalerStatus + { + /// + /// Initializes a new instance of the V1HorizontalPodAutoscalerStatus + /// class. + /// + public V1HorizontalPodAutoscalerStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1HorizontalPodAutoscalerStatus + /// class. + /// + /// current number of replicas of pods + /// managed by this autoscaler. + /// desired number of replicas of pods + /// managed by this autoscaler. + /// current average CPU + /// utilization over all pods, represented as a percentage of requested + /// CPU, e.g. 70 means that an average pod is using now 70% of its + /// requested CPU. + /// last time the HorizontalPodAutoscaler + /// scaled the number of pods; used by the autoscaler to control how + /// often the number of pods is changed. + /// most recent generation observed by + /// this autoscaler. + public V1HorizontalPodAutoscalerStatus(int currentReplicas, int desiredReplicas, int? currentCPUUtilizationPercentage = default(int?), System.DateTime? lastScaleTime = default(System.DateTime?), long? observedGeneration = default(long?)) + { + CurrentCPUUtilizationPercentage = currentCPUUtilizationPercentage; + CurrentReplicas = currentReplicas; + DesiredReplicas = desiredReplicas; + LastScaleTime = lastScaleTime; + ObservedGeneration = observedGeneration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current average CPU utilization over all pods, + /// represented as a percentage of requested CPU, e.g. 70 means that an + /// average pod is using now 70% of its requested CPU. + /// + [JsonProperty(PropertyName = "currentCPUUtilizationPercentage")] + public int? CurrentCPUUtilizationPercentage { get; set; } + + /// + /// Gets or sets current number of replicas of pods managed by this + /// autoscaler. + /// + [JsonProperty(PropertyName = "currentReplicas")] + public int CurrentReplicas { get; set; } + + /// + /// Gets or sets desired number of replicas of pods managed by this + /// autoscaler. + /// + [JsonProperty(PropertyName = "desiredReplicas")] + public int DesiredReplicas { get; set; } + + /// + /// Gets or sets last time the HorizontalPodAutoscaler scaled the + /// number of pods; used by the autoscaler to control how often the + /// number of pods is changed. + /// + [JsonProperty(PropertyName = "lastScaleTime")] + public System.DateTime? LastScaleTime { get; set; } + + /// + /// Gets or sets most recent generation observed by this autoscaler. + /// + [JsonProperty(PropertyName = "observedGeneration")] + public long? ObservedGeneration { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1HostPathVolumeSource.cs b/src/generated/Models/V1HostPathVolumeSource.cs new file mode 100755 index 000000000..654a5e089 --- /dev/null +++ b/src/generated/Models/V1HostPathVolumeSource.cs @@ -0,0 +1,62 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a host path mapped into a pod. Host path volumes do not + /// support ownership management or SELinux relabeling. + /// + public partial class V1HostPathVolumeSource + { + /// + /// Initializes a new instance of the V1HostPathVolumeSource class. + /// + public V1HostPathVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1HostPathVolumeSource class. + /// + /// Path of the directory on the host. More info: + /// http://kubernetes.io/docs/user-guide/volumes#hostpath + public V1HostPathVolumeSource(string path) + { + Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets path of the directory on the host. More info: + /// http://kubernetes.io/docs/user-guide/volumes#hostpath + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + } + } + } +} diff --git a/src/generated/Models/V1ISCSIVolumeSource.cs b/src/generated/Models/V1ISCSIVolumeSource.cs new file mode 100755 index 000000000..2b56e076e --- /dev/null +++ b/src/generated/Models/V1ISCSIVolumeSource.cs @@ -0,0 +1,135 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Represents an ISCSI disk. ISCSI volumes can only be mounted as + /// read/write once. ISCSI volumes support ownership management and SELinux + /// relabeling. + /// + public partial class V1ISCSIVolumeSource + { + /// + /// Initializes a new instance of the V1ISCSIVolumeSource class. + /// + public V1ISCSIVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ISCSIVolumeSource class. + /// + /// Target iSCSI Qualified Name. + /// iSCSI target lun number. + /// iSCSI target portal. The portal is + /// either an IP or ip_addr:port if the port is other than default + /// (typically TCP ports 860 and 3260). + /// Filesystem type of the volume that you want to + /// mount. Tip: Ensure that the filesystem type is supported by the + /// host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly + /// inferred to be "ext4" if unspecified. More info: + /// http://kubernetes.io/docs/user-guide/volumes#iscsi + /// Optional: Defaults to 'default' (tcp). + /// iSCSI interface name that uses an iSCSI transport. + /// iSCSI target portal List. The portal is + /// either an IP or ip_addr:port if the port is other than default + /// (typically TCP ports 860 and 3260). + /// ReadOnly here will force the + /// ReadOnly setting in VolumeMounts. Defaults to false. + public V1ISCSIVolumeSource(string iqn, int lun, string targetPortal, string fsType = default(string), string iscsiInterface = default(string), IList portals = default(IList), bool? readOnlyProperty = default(bool?)) + { + FsType = fsType; + Iqn = iqn; + IscsiInterface = iscsiInterface; + Lun = lun; + Portals = portals; + ReadOnlyProperty = readOnlyProperty; + TargetPortal = targetPortal; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets filesystem type of the volume that you want to mount. + /// Tip: Ensure that the filesystem type is supported by the host + /// operating system. Examples: "ext4", "xfs", "ntfs". Implicitly + /// inferred to be "ext4" if unspecified. More info: + /// http://kubernetes.io/docs/user-guide/volumes#iscsi + /// + [JsonProperty(PropertyName = "fsType")] + public string FsType { get; set; } + + /// + /// Gets or sets target iSCSI Qualified Name. + /// + [JsonProperty(PropertyName = "iqn")] + public string Iqn { get; set; } + + /// + /// Gets or sets optional: Defaults to 'default' (tcp). iSCSI interface + /// name that uses an iSCSI transport. + /// + [JsonProperty(PropertyName = "iscsiInterface")] + public string IscsiInterface { get; set; } + + /// + /// Gets or sets iSCSI target lun number. + /// + [JsonProperty(PropertyName = "lun")] + public int Lun { get; set; } + + /// + /// Gets or sets iSCSI target portal List. The portal is either an IP + /// or ip_addr:port if the port is other than default (typically TCP + /// ports 860 and 3260). + /// + [JsonProperty(PropertyName = "portals")] + public IList Portals { get; set; } + + /// + /// Gets or sets readOnly here will force the ReadOnly setting in + /// VolumeMounts. Defaults to false. + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets iSCSI target portal. The portal is either an IP or + /// ip_addr:port if the port is other than default (typically TCP ports + /// 860 and 3260). + /// + [JsonProperty(PropertyName = "targetPortal")] + public string TargetPortal { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Iqn == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Iqn"); + } + if (TargetPortal == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetPortal"); + } + } + } +} diff --git a/src/generated/Models/V1Job.cs b/src/generated/Models/V1Job.cs new file mode 100755 index 000000000..760fada00 --- /dev/null +++ b/src/generated/Models/V1Job.cs @@ -0,0 +1,116 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Job represents the configuration of a single job. + /// + public partial class V1Job + { + /// + /// Initializes a new instance of the V1Job class. + /// + public V1Job() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Job class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Spec is a structure defining the expected + /// behavior of a job. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// Status is a structure describing current + /// status of a job. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1Job(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1JobSpec spec = default(V1JobSpec), V1JobStatus status = default(V1JobStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec is a structure defining the expected behavior of + /// a job. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1JobSpec Spec { get; set; } + + /// + /// Gets or sets status is a structure describing current status of a + /// job. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "status")] + public V1JobStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1JobCondition.cs b/src/generated/Models/V1JobCondition.cs new file mode 100755 index 000000000..780d60f73 --- /dev/null +++ b/src/generated/Models/V1JobCondition.cs @@ -0,0 +1,111 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// JobCondition describes current state of a job. + /// + public partial class V1JobCondition + { + /// + /// Initializes a new instance of the V1JobCondition class. + /// + public V1JobCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1JobCondition class. + /// + /// Status of the condition, one of True, False, + /// Unknown. + /// Type of job condition, Complete or + /// Failed. + /// Last time the condition was + /// checked. + /// Last time the condition transit + /// from one status to another. + /// Human readable message indicating details + /// about last transition. + /// (brief) reason for the condition's last + /// transition. + public V1JobCondition(string status, string type, System.DateTime? lastProbeTime = default(System.DateTime?), System.DateTime? lastTransitionTime = default(System.DateTime?), string message = default(string), string reason = default(string)) + { + LastProbeTime = lastProbeTime; + LastTransitionTime = lastTransitionTime; + Message = message; + Reason = reason; + Status = status; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets last time the condition was checked. + /// + [JsonProperty(PropertyName = "lastProbeTime")] + public System.DateTime? LastProbeTime { get; set; } + + /// + /// Gets or sets last time the condition transit from one status to + /// another. + /// + [JsonProperty(PropertyName = "lastTransitionTime")] + public System.DateTime? LastTransitionTime { get; set; } + + /// + /// Gets or sets human readable message indicating details about last + /// transition. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets (brief) reason for the condition's last transition. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets status of the condition, one of True, False, Unknown. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets type of job condition, Complete or Failed. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Status"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/src/generated/Models/V1JobList.cs b/src/generated/Models/V1JobList.cs new file mode 100755 index 000000000..ad0cee08e --- /dev/null +++ b/src/generated/Models/V1JobList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// JobList is a collection of jobs. + /// + public partial class V1JobList + { + /// + /// Initializes a new instance of the V1JobList class. + /// + public V1JobList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1JobList class. + /// + /// Items is the list of Job. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1JobList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is the list of Job. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1JobSpec.cs b/src/generated/Models/V1JobSpec.cs new file mode 100755 index 000000000..8077c508c --- /dev/null +++ b/src/generated/Models/V1JobSpec.cs @@ -0,0 +1,158 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// JobSpec describes how the job execution will look like. + /// + public partial class V1JobSpec + { + /// + /// Initializes a new instance of the V1JobSpec class. + /// + public V1JobSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1JobSpec class. + /// + /// Template is the object that describes the + /// pod that will be created when executing a job. More info: + /// http://kubernetes.io/docs/user-guide/jobs + /// Optional duration in seconds + /// relative to the startTime that the job may be active before the + /// system tries to terminate it; value must be positive + /// integer + /// Completions specifies the desired number + /// of successfully finished pods the job should be run with. Setting + /// to nil means that the success of any pod signals the success of all + /// pods, and allows parallelism to have any positive value. Setting + /// to 1 means that parallelism is limited to 1 and the success of that + /// pod signals the success of the job. More info: + /// http://kubernetes.io/docs/user-guide/jobs + /// ManualSelector controls generation of + /// pod labels and pod selectors. Leave `manualSelector` unset unless + /// you are certain what you are doing. When false or unset, the system + /// pick labels unique to this job and appends those labels to the pod + /// template. When true, the user is responsible for picking unique + /// labels and specifying the selector. Failure to pick a unique label + /// may cause this and other jobs to not function correctly. However, + /// You may see `manualSelector=true` in jobs that were created with + /// the old `extensions/v1beta1` API. More info: + /// http://releases.k8s.io/HEAD/docs/design/selector-generation.md + /// Parallelism specifies the maximum desired + /// number of pods the job should run at any given time. The actual + /// number of pods running in steady state will be less than this + /// number when ((.spec.completions - .status.successful) < + /// .spec.parallelism), i.e. when the work left to do is less than max + /// parallelism. More info: + /// http://kubernetes.io/docs/user-guide/jobs + /// Selector is a label query over pods that + /// should match the pod count. Normally, the system sets this field + /// for you. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + public V1JobSpec(V1PodTemplateSpec template, long? activeDeadlineSeconds = default(long?), int? completions = default(int?), bool? manualSelector = default(bool?), int? parallelism = default(int?), V1LabelSelector selector = default(V1LabelSelector)) + { + ActiveDeadlineSeconds = activeDeadlineSeconds; + Completions = completions; + ManualSelector = manualSelector; + Parallelism = parallelism; + Selector = selector; + Template = template; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets optional duration in seconds relative to the startTime + /// that the job may be active before the system tries to terminate it; + /// value must be positive integer + /// + [JsonProperty(PropertyName = "activeDeadlineSeconds")] + public long? ActiveDeadlineSeconds { get; set; } + + /// + /// Gets or sets completions specifies the desired number of + /// successfully finished pods the job should be run with. Setting to + /// nil means that the success of any pod signals the success of all + /// pods, and allows parallelism to have any positive value. Setting + /// to 1 means that parallelism is limited to 1 and the success of that + /// pod signals the success of the job. More info: + /// http://kubernetes.io/docs/user-guide/jobs + /// + [JsonProperty(PropertyName = "completions")] + public int? Completions { get; set; } + + /// + /// Gets or sets manualSelector controls generation of pod labels and + /// pod selectors. Leave `manualSelector` unset unless you are certain + /// what you are doing. When false or unset, the system pick labels + /// unique to this job and appends those labels to the pod template. + /// When true, the user is responsible for picking unique labels and + /// specifying the selector. Failure to pick a unique label may cause + /// this and other jobs to not function correctly. However, You may + /// see `manualSelector=true` in jobs that were created with the old + /// `extensions/v1beta1` API. More info: + /// http://releases.k8s.io/HEAD/docs/design/selector-generation.md + /// + [JsonProperty(PropertyName = "manualSelector")] + public bool? ManualSelector { get; set; } + + /// + /// Gets or sets parallelism specifies the maximum desired number of + /// pods the job should run at any given time. The actual number of + /// pods running in steady state will be less than this number when + /// ((.spec.completions - .status.successful) &lt; + /// .spec.parallelism), i.e. when the work left to do is less than max + /// parallelism. More info: http://kubernetes.io/docs/user-guide/jobs + /// + [JsonProperty(PropertyName = "parallelism")] + public int? Parallelism { get; set; } + + /// + /// Gets or sets selector is a label query over pods that should match + /// the pod count. Normally, the system sets this field for you. More + /// info: http://kubernetes.io/docs/user-guide/labels#label-selectors + /// + [JsonProperty(PropertyName = "selector")] + public V1LabelSelector Selector { get; set; } + + /// + /// Gets or sets template is the object that describes the pod that + /// will be created when executing a job. More info: + /// http://kubernetes.io/docs/user-guide/jobs + /// + [JsonProperty(PropertyName = "template")] + public V1PodTemplateSpec Template { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Template == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Template"); + } + if (Template != null) + { + Template.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1JobStatus.cs b/src/generated/Models/V1JobStatus.cs new file mode 100755 index 000000000..7e451f764 --- /dev/null +++ b/src/generated/Models/V1JobStatus.cs @@ -0,0 +1,108 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// JobStatus represents the current state of a Job. + /// + public partial class V1JobStatus + { + /// + /// Initializes a new instance of the V1JobStatus class. + /// + public V1JobStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1JobStatus class. + /// + /// Active is the number of actively running + /// pods. + /// CompletionTime represents time when + /// the job was completed. It is not guaranteed to be set in + /// happens-before order across separate operations. It is represented + /// in RFC3339 form and is in UTC. + /// Conditions represent the latest available + /// observations of an object's current state. More info: + /// http://kubernetes.io/docs/user-guide/jobs + /// Failed is the number of pods which reached + /// Phase Failed. + /// StartTime represents time when the job was + /// acknowledged by the Job Manager. It is not guaranteed to be set in + /// happens-before order across separate operations. It is represented + /// in RFC3339 form and is in UTC. + /// Succeeded is the number of pods which + /// reached Phase Succeeded. + public V1JobStatus(int? active = default(int?), System.DateTime? completionTime = default(System.DateTime?), IList conditions = default(IList), int? failed = default(int?), System.DateTime? startTime = default(System.DateTime?), int? succeeded = default(int?)) + { + Active = active; + CompletionTime = completionTime; + Conditions = conditions; + Failed = failed; + StartTime = startTime; + Succeeded = succeeded; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets active is the number of actively running pods. + /// + [JsonProperty(PropertyName = "active")] + public int? Active { get; set; } + + /// + /// Gets or sets completionTime represents time when the job was + /// completed. It is not guaranteed to be set in happens-before order + /// across separate operations. It is represented in RFC3339 form and + /// is in UTC. + /// + [JsonProperty(PropertyName = "completionTime")] + public System.DateTime? CompletionTime { get; set; } + + /// + /// Gets or sets conditions represent the latest available observations + /// of an object's current state. More info: + /// http://kubernetes.io/docs/user-guide/jobs + /// + [JsonProperty(PropertyName = "conditions")] + public IList Conditions { get; set; } + + /// + /// Gets or sets failed is the number of pods which reached Phase + /// Failed. + /// + [JsonProperty(PropertyName = "failed")] + public int? Failed { get; set; } + + /// + /// Gets or sets startTime represents time when the job was + /// acknowledged by the Job Manager. It is not guaranteed to be set in + /// happens-before order across separate operations. It is represented + /// in RFC3339 form and is in UTC. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; set; } + + /// + /// Gets or sets succeeded is the number of pods which reached Phase + /// Succeeded. + /// + [JsonProperty(PropertyName = "succeeded")] + public int? Succeeded { get; set; } + + } +} diff --git a/src/generated/Models/V1KeyToPath.cs b/src/generated/Models/V1KeyToPath.cs new file mode 100755 index 000000000..9acfd98b6 --- /dev/null +++ b/src/generated/Models/V1KeyToPath.cs @@ -0,0 +1,91 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Maps a string key to a path within a volume. + /// + public partial class V1KeyToPath + { + /// + /// Initializes a new instance of the V1KeyToPath class. + /// + public V1KeyToPath() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1KeyToPath class. + /// + /// The key to project. + /// The relative path of the file to map the key to. + /// May not be an absolute path. May not contain the path element '..'. + /// May not start with the string '..'. + /// Optional: mode bits to use on this file, must be + /// a value between 0 and 0777. If not specified, the volume + /// defaultMode will be used. This might be in conflict with other + /// options that affect the file mode, like fsGroup, and the result can + /// be other mode bits set. + public V1KeyToPath(string key, string path, int? mode = default(int?)) + { + Key = key; + Mode = mode; + Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the key to project. + /// + [JsonProperty(PropertyName = "key")] + public string Key { get; set; } + + /// + /// Gets or sets optional: mode bits to use on this file, must be a + /// value between 0 and 0777. If not specified, the volume defaultMode + /// will be used. This might be in conflict with other options that + /// affect the file mode, like fsGroup, and the result can be other + /// mode bits set. + /// + [JsonProperty(PropertyName = "mode")] + public int? Mode { get; set; } + + /// + /// Gets or sets the relative path of the file to map the key to. May + /// not be an absolute path. May not contain the path element '..'. May + /// not start with the string '..'. + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Key == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Key"); + } + if (Path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + } + } + } +} diff --git a/src/generated/Models/V1LabelSelector.cs b/src/generated/Models/V1LabelSelector.cs new file mode 100755 index 000000000..5c2fd5f61 --- /dev/null +++ b/src/generated/Models/V1LabelSelector.cs @@ -0,0 +1,67 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A label selector is a label query over a set of resources. The result + /// of matchLabels and matchExpressions are ANDed. An empty label selector + /// matches all objects. A null label selector matches no objects. + /// + public partial class V1LabelSelector + { + /// + /// Initializes a new instance of the V1LabelSelector class. + /// + public V1LabelSelector() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1LabelSelector class. + /// + /// matchExpressions is a list of label + /// selector requirements. The requirements are ANDed. + /// matchLabels is a map of {key,value} + /// pairs. A single {key,value} in the matchLabels map is equivalent to + /// an element of matchExpressions, whose key field is "key", the + /// operator is "In", and the values array contains only "value". The + /// requirements are ANDed. + public V1LabelSelector(IList matchExpressions = default(IList), IDictionary matchLabels = default(IDictionary)) + { + MatchExpressions = matchExpressions; + MatchLabels = matchLabels; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets matchExpressions is a list of label selector + /// requirements. The requirements are ANDed. + /// + [JsonProperty(PropertyName = "matchExpressions")] + public IList MatchExpressions { get; set; } + + /// + /// Gets or sets matchLabels is a map of {key,value} pairs. A single + /// {key,value} in the matchLabels map is equivalent to an element of + /// matchExpressions, whose key field is "key", the operator is "In", + /// and the values array contains only "value". The requirements are + /// ANDed. + /// + [JsonProperty(PropertyName = "matchLabels")] + public IDictionary MatchLabels { get; set; } + + } +} diff --git a/src/generated/Models/V1LabelSelectorRequirement.cs b/src/generated/Models/V1LabelSelectorRequirement.cs new file mode 100755 index 000000000..dd020c234 --- /dev/null +++ b/src/generated/Models/V1LabelSelectorRequirement.cs @@ -0,0 +1,92 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A label selector requirement is a selector that contains values, a key, + /// and an operator that relates the key and values. + /// + public partial class V1LabelSelectorRequirement + { + /// + /// Initializes a new instance of the V1LabelSelectorRequirement class. + /// + public V1LabelSelectorRequirement() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1LabelSelectorRequirement class. + /// + /// key is the label key that the selector applies + /// to. + /// operator represents a key's + /// relationship to a set of values. Valid operators ard In, NotIn, + /// Exists and DoesNotExist. + /// values is an array of string values. If the + /// operator is In or NotIn, the values array must be non-empty. If the + /// operator is Exists or DoesNotExist, the values array must be empty. + /// This array is replaced during a strategic merge patch. + public V1LabelSelectorRequirement(string key, string operatorProperty, IList values = default(IList)) + { + Key = key; + OperatorProperty = operatorProperty; + Values = values; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets key is the label key that the selector applies to. + /// + [JsonProperty(PropertyName = "key")] + public string Key { get; set; } + + /// + /// Gets or sets operator represents a key's relationship to a set of + /// values. Valid operators ard In, NotIn, Exists and DoesNotExist. + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets values is an array of string values. If the operator + /// is In or NotIn, the values array must be non-empty. If the operator + /// is Exists or DoesNotExist, the values array must be empty. This + /// array is replaced during a strategic merge patch. + /// + [JsonProperty(PropertyName = "values")] + public IList Values { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Key == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Key"); + } + if (OperatorProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty"); + } + } + } +} diff --git a/src/generated/Models/V1Lifecycle.cs b/src/generated/Models/V1Lifecycle.cs new file mode 100755 index 000000000..658cae908 --- /dev/null +++ b/src/generated/Models/V1Lifecycle.cs @@ -0,0 +1,95 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Lifecycle describes actions that the management system should take in + /// response to container lifecycle events. For the PostStart and PreStop + /// lifecycle handlers, management of the container blocks until the action + /// is complete, unless the container process fails, in which case the + /// handler is aborted. + /// + public partial class V1Lifecycle + { + /// + /// Initializes a new instance of the V1Lifecycle class. + /// + public V1Lifecycle() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Lifecycle class. + /// + /// PostStart is called immediately after a + /// container is created. If the handler fails, the container is + /// terminated and restarted according to its restart policy. Other + /// management of the container blocks until the hook completes. More + /// info: + /// http://kubernetes.io/docs/user-guide/container-environment#hook-details + /// PreStop is called immediately before a + /// container is terminated. The container is terminated after the + /// handler completes. The reason for termination is passed to the + /// handler. Regardless of the outcome of the handler, the container is + /// eventually terminated. Other management of the container blocks + /// until the hook completes. More info: + /// http://kubernetes.io/docs/user-guide/container-environment#hook-details + public V1Lifecycle(V1Handler postStart = default(V1Handler), V1Handler preStop = default(V1Handler)) + { + PostStart = postStart; + PreStop = preStop; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets postStart is called immediately after a container is + /// created. If the handler fails, the container is terminated and + /// restarted according to its restart policy. Other management of the + /// container blocks until the hook completes. More info: + /// http://kubernetes.io/docs/user-guide/container-environment#hook-details + /// + [JsonProperty(PropertyName = "postStart")] + public V1Handler PostStart { get; set; } + + /// + /// Gets or sets preStop is called immediately before a container is + /// terminated. The container is terminated after the handler + /// completes. The reason for termination is passed to the handler. + /// Regardless of the outcome of the handler, the container is + /// eventually terminated. Other management of the container blocks + /// until the hook completes. More info: + /// http://kubernetes.io/docs/user-guide/container-environment#hook-details + /// + [JsonProperty(PropertyName = "preStop")] + public V1Handler PreStop { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PostStart != null) + { + PostStart.Validate(); + } + if (PreStop != null) + { + PreStop.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1LimitRange.cs b/src/generated/Models/V1LimitRange.cs new file mode 100755 index 000000000..477fd2b46 --- /dev/null +++ b/src/generated/Models/V1LimitRange.cs @@ -0,0 +1,103 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// LimitRange sets resource usage limits for each kind of resource in a + /// Namespace. + /// + public partial class V1LimitRange + { + /// + /// Initializes a new instance of the V1LimitRange class. + /// + public V1LimitRange() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1LimitRange class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Spec defines the limits enforced. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1LimitRange(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1LimitRangeSpec spec = default(V1LimitRangeSpec)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec defines the limits enforced. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1LimitRangeSpec Spec { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1LimitRangeItem.cs b/src/generated/Models/V1LimitRangeItem.cs new file mode 100755 index 000000000..c721a86d3 --- /dev/null +++ b/src/generated/Models/V1LimitRangeItem.cs @@ -0,0 +1,103 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// LimitRangeItem defines a min/max usage limit for any resource that + /// matches on kind. + /// + public partial class V1LimitRangeItem + { + /// + /// Initializes a new instance of the V1LimitRangeItem class. + /// + public V1LimitRangeItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1LimitRangeItem class. + /// + /// Default resource requirement limit + /// value by resource name if resource limit is omitted. + /// DefaultRequest is the default resource + /// requirement request value by resource name if resource request is + /// omitted. + /// Max usage constraints on this kind by resource + /// name. + /// MaxLimitRequestRatio if + /// specified, the named resource must have a request and limit that + /// are both non-zero where limit divided by request is less than or + /// equal to the enumerated value; this represents the max burst for + /// the named resource. + /// Min usage constraints on this kind by resource + /// name. + /// Type of resource that this limit applies + /// to. + public V1LimitRangeItem(IDictionary defaultProperty = default(IDictionary), IDictionary defaultRequest = default(IDictionary), IDictionary max = default(IDictionary), IDictionary maxLimitRequestRatio = default(IDictionary), IDictionary min = default(IDictionary), string type = default(string)) + { + DefaultProperty = defaultProperty; + DefaultRequest = defaultRequest; + Max = max; + MaxLimitRequestRatio = maxLimitRequestRatio; + Min = min; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets default resource requirement limit value by resource + /// name if resource limit is omitted. + /// + [JsonProperty(PropertyName = "default")] + public IDictionary DefaultProperty { get; set; } + + /// + /// Gets or sets defaultRequest is the default resource requirement + /// request value by resource name if resource request is omitted. + /// + [JsonProperty(PropertyName = "defaultRequest")] + public IDictionary DefaultRequest { get; set; } + + /// + /// Gets or sets max usage constraints on this kind by resource name. + /// + [JsonProperty(PropertyName = "max")] + public IDictionary Max { get; set; } + + /// + /// Gets or sets maxLimitRequestRatio if specified, the named resource + /// must have a request and limit that are both non-zero where limit + /// divided by request is less than or equal to the enumerated value; + /// this represents the max burst for the named resource. + /// + [JsonProperty(PropertyName = "maxLimitRequestRatio")] + public IDictionary MaxLimitRequestRatio { get; set; } + + /// + /// Gets or sets min usage constraints on this kind by resource name. + /// + [JsonProperty(PropertyName = "min")] + public IDictionary Min { get; set; } + + /// + /// Gets or sets type of resource that this limit applies to. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + } +} diff --git a/src/generated/Models/V1LimitRangeList.cs b/src/generated/Models/V1LimitRangeList.cs new file mode 100755 index 000000000..b69938dd5 --- /dev/null +++ b/src/generated/Models/V1LimitRangeList.cs @@ -0,0 +1,116 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// LimitRangeList is a list of LimitRange items. + /// + public partial class V1LimitRangeList + { + /// + /// Initializes a new instance of the V1LimitRangeList class. + /// + public V1LimitRangeList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1LimitRangeList class. + /// + /// Items is a list of LimitRange objects. More + /// info: + /// http://releases.k8s.io/HEAD/docs/design/admission_control_limit_range.md + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1LimitRangeList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of LimitRange objects. More info: + /// http://releases.k8s.io/HEAD/docs/design/admission_control_limit_range.md + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1LimitRangeSpec.cs b/src/generated/Models/V1LimitRangeSpec.cs new file mode 100755 index 000000000..48746b2b2 --- /dev/null +++ b/src/generated/Models/V1LimitRangeSpec.cs @@ -0,0 +1,64 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// LimitRangeSpec defines a min/max usage limit for resources that match + /// on kind. + /// + public partial class V1LimitRangeSpec + { + /// + /// Initializes a new instance of the V1LimitRangeSpec class. + /// + public V1LimitRangeSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1LimitRangeSpec class. + /// + /// Limits is the list of LimitRangeItem objects + /// that are enforced. + public V1LimitRangeSpec(IList limits) + { + Limits = limits; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets limits is the list of LimitRangeItem objects that are + /// enforced. + /// + [JsonProperty(PropertyName = "limits")] + public IList Limits { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Limits == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Limits"); + } + } + } +} diff --git a/src/generated/Models/V1ListMeta.cs b/src/generated/Models/V1ListMeta.cs new file mode 100755 index 000000000..7af3d02c4 --- /dev/null +++ b/src/generated/Models/V1ListMeta.cs @@ -0,0 +1,67 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ListMeta describes metadata that synthetic resources must have, + /// including lists and various status objects. A resource may have only + /// one of {ObjectMeta, ListMeta}. + /// + public partial class V1ListMeta + { + /// + /// Initializes a new instance of the V1ListMeta class. + /// + public V1ListMeta() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ListMeta class. + /// + /// String that identifies the server's + /// internal version of this object that can be used by clients to + /// determine when objects have changed. Value must be treated as + /// opaque by clients and passed unmodified back to the server. + /// Populated by the system. Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + /// SelfLink is a URL representing this object. + /// Populated by the system. Read-only. + public V1ListMeta(string resourceVersion = default(string), string selfLink = default(string)) + { + ResourceVersion = resourceVersion; + SelfLink = selfLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets string that identifies the server's internal version + /// of this object that can be used by clients to determine when + /// objects have changed. Value must be treated as opaque by clients + /// and passed unmodified back to the server. Populated by the system. + /// Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + /// + [JsonProperty(PropertyName = "resourceVersion")] + public string ResourceVersion { get; set; } + + /// + /// Gets or sets selfLink is a URL representing this object. Populated + /// by the system. Read-only. + /// + [JsonProperty(PropertyName = "selfLink")] + public string SelfLink { get; set; } + + } +} diff --git a/src/generated/Models/V1LoadBalancerIngress.cs b/src/generated/Models/V1LoadBalancerIngress.cs new file mode 100755 index 000000000..35692cbc1 --- /dev/null +++ b/src/generated/Models/V1LoadBalancerIngress.cs @@ -0,0 +1,59 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// LoadBalancerIngress represents the status of a load-balancer ingress + /// point: traffic intended for the service should be sent to an ingress + /// point. + /// + public partial class V1LoadBalancerIngress + { + /// + /// Initializes a new instance of the V1LoadBalancerIngress class. + /// + public V1LoadBalancerIngress() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1LoadBalancerIngress class. + /// + /// Hostname is set for load-balancer ingress + /// points that are DNS based (typically AWS load-balancers) + /// IP is set for load-balancer ingress points that + /// are IP based (typically GCE or OpenStack load-balancers) + public V1LoadBalancerIngress(string hostname = default(string), string ip = default(string)) + { + Hostname = hostname; + Ip = ip; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets hostname is set for load-balancer ingress points that + /// are DNS based (typically AWS load-balancers) + /// + [JsonProperty(PropertyName = "hostname")] + public string Hostname { get; set; } + + /// + /// Gets or sets IP is set for load-balancer ingress points that are IP + /// based (typically GCE or OpenStack load-balancers) + /// + [JsonProperty(PropertyName = "ip")] + public string Ip { get; set; } + + } +} diff --git a/src/generated/Models/V1LoadBalancerStatus.cs b/src/generated/Models/V1LoadBalancerStatus.cs new file mode 100755 index 000000000..6e6b58311 --- /dev/null +++ b/src/generated/Models/V1LoadBalancerStatus.cs @@ -0,0 +1,51 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// LoadBalancerStatus represents the status of a load-balancer. + /// + public partial class V1LoadBalancerStatus + { + /// + /// Initializes a new instance of the V1LoadBalancerStatus class. + /// + public V1LoadBalancerStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1LoadBalancerStatus class. + /// + /// Ingress is a list containing ingress points + /// for the load-balancer. Traffic intended for the service should be + /// sent to these ingress points. + public V1LoadBalancerStatus(IList ingress = default(IList)) + { + Ingress = ingress; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets ingress is a list containing ingress points for the + /// load-balancer. Traffic intended for the service should be sent to + /// these ingress points. + /// + [JsonProperty(PropertyName = "ingress")] + public IList Ingress { get; set; } + + } +} diff --git a/src/generated/Models/V1LocalObjectReference.cs b/src/generated/Models/V1LocalObjectReference.cs new file mode 100755 index 000000000..5d4bfa2bf --- /dev/null +++ b/src/generated/Models/V1LocalObjectReference.cs @@ -0,0 +1,48 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// LocalObjectReference contains enough information to let you locate the + /// referenced object inside the same namespace. + /// + public partial class V1LocalObjectReference + { + /// + /// Initializes a new instance of the V1LocalObjectReference class. + /// + public V1LocalObjectReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1LocalObjectReference class. + /// + /// Name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + public V1LocalObjectReference(string name = default(string)) + { + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/src/generated/Models/V1LocalSubjectAccessReview.cs b/src/generated/Models/V1LocalSubjectAccessReview.cs new file mode 100755 index 000000000..624bf9a6c --- /dev/null +++ b/src/generated/Models/V1LocalSubjectAccessReview.cs @@ -0,0 +1,118 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// LocalSubjectAccessReview checks whether or not a user or group can + /// perform an action in a given namespace. Having a namespace scoped + /// resource makes it much easier to grant namespace scoped policy that + /// includes permissions checking. + /// + public partial class V1LocalSubjectAccessReview + { + /// + /// Initializes a new instance of the V1LocalSubjectAccessReview class. + /// + public V1LocalSubjectAccessReview() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1LocalSubjectAccessReview class. + /// + /// Spec holds information about the request being + /// evaluated. spec.namespace must be equal to the namespace you made + /// the request against. If empty, it is defaulted. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Status is filled in by the server and + /// indicates whether the request is allowed or not + public V1LocalSubjectAccessReview(V1SubjectAccessReviewSpec spec, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1SubjectAccessReviewStatus status = default(V1SubjectAccessReviewStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec holds information about the request being + /// evaluated. spec.namespace must be equal to the namespace you made + /// the request against. If empty, it is defaulted. + /// + [JsonProperty(PropertyName = "spec")] + public V1SubjectAccessReviewSpec Spec { get; set; } + + /// + /// Gets or sets status is filled in by the server and indicates + /// whether the request is allowed or not + /// + [JsonProperty(PropertyName = "status")] + public V1SubjectAccessReviewStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Spec"); + } + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1NFSVolumeSource.cs b/src/generated/Models/V1NFSVolumeSource.cs new file mode 100755 index 000000000..4cd8f752a --- /dev/null +++ b/src/generated/Models/V1NFSVolumeSource.cs @@ -0,0 +1,89 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents an NFS mount that lasts the lifetime of a pod. NFS volumes + /// do not support ownership management or SELinux relabeling. + /// + public partial class V1NFSVolumeSource + { + /// + /// Initializes a new instance of the V1NFSVolumeSource class. + /// + public V1NFSVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NFSVolumeSource class. + /// + /// Path that is exported by the NFS server. More + /// info: http://kubernetes.io/docs/user-guide/volumes#nfs + /// Server is the hostname or IP address of the + /// NFS server. More info: + /// http://kubernetes.io/docs/user-guide/volumes#nfs + /// ReadOnly here will force the NFS + /// export to be mounted with read-only permissions. Defaults to false. + /// More info: http://kubernetes.io/docs/user-guide/volumes#nfs + public V1NFSVolumeSource(string path, string server, bool? readOnlyProperty = default(bool?)) + { + Path = path; + ReadOnlyProperty = readOnlyProperty; + Server = server; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets path that is exported by the NFS server. More info: + /// http://kubernetes.io/docs/user-guide/volumes#nfs + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or sets readOnly here will force the NFS export to be mounted + /// with read-only permissions. Defaults to false. More info: + /// http://kubernetes.io/docs/user-guide/volumes#nfs + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets server is the hostname or IP address of the NFS + /// server. More info: http://kubernetes.io/docs/user-guide/volumes#nfs + /// + [JsonProperty(PropertyName = "server")] + public string Server { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + } + if (Server == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Server"); + } + } + } +} diff --git a/src/generated/Models/V1Namespace.cs b/src/generated/Models/V1Namespace.cs new file mode 100755 index 000000000..c7a2bb2f1 --- /dev/null +++ b/src/generated/Models/V1Namespace.cs @@ -0,0 +1,103 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Namespace provides a scope for Names. Use of multiple namespaces is + /// optional. + /// + public partial class V1Namespace + { + /// + /// Initializes a new instance of the V1Namespace class. + /// + public V1Namespace() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Namespace class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Spec defines the behavior of the Namespace. More + /// info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// Status describes the current status of a + /// Namespace. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1Namespace(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1NamespaceSpec spec = default(V1NamespaceSpec), V1NamespaceStatus status = default(V1NamespaceStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec defines the behavior of the Namespace. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1NamespaceSpec Spec { get; set; } + + /// + /// Gets or sets status describes the current status of a Namespace. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "status")] + public V1NamespaceStatus Status { get; set; } + + } +} diff --git a/src/generated/Models/V1NamespaceList.cs b/src/generated/Models/V1NamespaceList.cs new file mode 100755 index 000000000..e7fc2e43c --- /dev/null +++ b/src/generated/Models/V1NamespaceList.cs @@ -0,0 +1,106 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// NamespaceList is a list of Namespaces. + /// + public partial class V1NamespaceList + { + /// + /// Initializes a new instance of the V1NamespaceList class. + /// + public V1NamespaceList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NamespaceList class. + /// + /// Items is the list of Namespace objects in the + /// list. More info: + /// http://kubernetes.io/docs/user-guide/namespaces + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1NamespaceList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is the list of Namespace objects in the list. + /// More info: http://kubernetes.io/docs/user-guide/namespaces + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + } + } +} diff --git a/src/generated/Models/V1NamespaceSpec.cs b/src/generated/Models/V1NamespaceSpec.cs new file mode 100755 index 000000000..22d9328a6 --- /dev/null +++ b/src/generated/Models/V1NamespaceSpec.cs @@ -0,0 +1,52 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// NamespaceSpec describes the attributes on a Namespace. + /// + public partial class V1NamespaceSpec + { + /// + /// Initializes a new instance of the V1NamespaceSpec class. + /// + public V1NamespaceSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NamespaceSpec class. + /// + /// Finalizers is an opaque list of values + /// that must be empty to permanently remove object from storage. More + /// info: + /// http://releases.k8s.io/HEAD/docs/design/namespaces.md#finalizers + public V1NamespaceSpec(IList finalizers = default(IList)) + { + Finalizers = finalizers; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets finalizers is an opaque list of values that must be + /// empty to permanently remove object from storage. More info: + /// http://releases.k8s.io/HEAD/docs/design/namespaces.md#finalizers + /// + [JsonProperty(PropertyName = "finalizers")] + public IList Finalizers { get; set; } + + } +} diff --git a/src/generated/Models/V1NamespaceStatus.cs b/src/generated/Models/V1NamespaceStatus.cs new file mode 100755 index 000000000..11e2848fe --- /dev/null +++ b/src/generated/Models/V1NamespaceStatus.cs @@ -0,0 +1,49 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// NamespaceStatus is information about the current status of a Namespace. + /// + public partial class V1NamespaceStatus + { + /// + /// Initializes a new instance of the V1NamespaceStatus class. + /// + public V1NamespaceStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NamespaceStatus class. + /// + /// Phase is the current lifecycle phase of the + /// namespace. More info: + /// http://releases.k8s.io/HEAD/docs/design/namespaces.md#phases + public V1NamespaceStatus(string phase = default(string)) + { + Phase = phase; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets phase is the current lifecycle phase of the namespace. + /// More info: + /// http://releases.k8s.io/HEAD/docs/design/namespaces.md#phases + /// + [JsonProperty(PropertyName = "phase")] + public string Phase { get; set; } + + } +} diff --git a/src/generated/Models/V1Node.cs b/src/generated/Models/V1Node.cs new file mode 100755 index 000000000..ade1b3f67 --- /dev/null +++ b/src/generated/Models/V1Node.cs @@ -0,0 +1,115 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Node is a worker node in Kubernetes. Each node will have a unique + /// identifier in the cache (i.e. in etcd). + /// + public partial class V1Node + { + /// + /// Initializes a new instance of the V1Node class. + /// + public V1Node() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Node class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Spec defines the behavior of a node. + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// Most recently observed status of the node. + /// Populated by the system. Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1Node(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1NodeSpec spec = default(V1NodeSpec), V1NodeStatus status = default(V1NodeStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec defines the behavior of a node. + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1NodeSpec Spec { get; set; } + + /// + /// Gets or sets most recently observed status of the node. Populated + /// by the system. Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "status")] + public V1NodeStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1NodeAddress.cs b/src/generated/Models/V1NodeAddress.cs new file mode 100755 index 000000000..3ec2d927f --- /dev/null +++ b/src/generated/Models/V1NodeAddress.cs @@ -0,0 +1,73 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// NodeAddress contains information for the node's address. + /// + public partial class V1NodeAddress + { + /// + /// Initializes a new instance of the V1NodeAddress class. + /// + public V1NodeAddress() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NodeAddress class. + /// + /// The node address. + /// Node address type, one of Hostname, ExternalIP + /// or InternalIP. + public V1NodeAddress(string address, string type) + { + Address = address; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the node address. + /// + [JsonProperty(PropertyName = "address")] + public string Address { get; set; } + + /// + /// Gets or sets node address type, one of Hostname, ExternalIP or + /// InternalIP. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Address == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Address"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/src/generated/Models/V1NodeAffinity.cs b/src/generated/Models/V1NodeAffinity.cs new file mode 100755 index 000000000..9364a4946 --- /dev/null +++ b/src/generated/Models/V1NodeAffinity.cs @@ -0,0 +1,108 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Node affinity is a group of node affinity scheduling rules. + /// + public partial class V1NodeAffinity + { + /// + /// Initializes a new instance of the V1NodeAffinity class. + /// + public V1NodeAffinity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NodeAffinity class. + /// + /// The + /// scheduler will prefer to schedule pods to nodes that satisfy the + /// affinity expressions specified by this field, but it may choose a + /// node that violates one or more of the expressions. The node that is + /// most preferred is the one with the greatest sum of weights, i.e. + /// for each node that meets all of the scheduling requirements + /// (resource request, requiredDuringScheduling affinity expressions, + /// etc.), compute a sum by iterating through the elements of this + /// field and adding "weight" to the sum if the node matches the + /// corresponding matchExpressions; the node(s) with the highest sum + /// are the most preferred. + /// If the + /// affinity requirements specified by this field are not met at + /// scheduling time, the pod will not be scheduled onto the node. If + /// the affinity requirements specified by this field cease to be met + /// at some point during pod execution (e.g. due to an update), the + /// system may or may not try to eventually evict the pod from its + /// node. + public V1NodeAffinity(IList preferredDuringSchedulingIgnoredDuringExecution = default(IList), V1NodeSelector requiredDuringSchedulingIgnoredDuringExecution = default(V1NodeSelector)) + { + PreferredDuringSchedulingIgnoredDuringExecution = preferredDuringSchedulingIgnoredDuringExecution; + RequiredDuringSchedulingIgnoredDuringExecution = requiredDuringSchedulingIgnoredDuringExecution; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the scheduler will prefer to schedule pods to nodes + /// that satisfy the affinity expressions specified by this field, but + /// it may choose a node that violates one or more of the expressions. + /// The node that is most preferred is the one with the greatest sum of + /// weights, i.e. for each node that meets all of the scheduling + /// requirements (resource request, requiredDuringScheduling affinity + /// expressions, etc.), compute a sum by iterating through the elements + /// of this field and adding "weight" to the sum if the node matches + /// the corresponding matchExpressions; the node(s) with the highest + /// sum are the most preferred. + /// + [JsonProperty(PropertyName = "preferredDuringSchedulingIgnoredDuringExecution")] + public IList PreferredDuringSchedulingIgnoredDuringExecution { get; set; } + + /// + /// Gets or sets if the affinity requirements specified by this field + /// are not met at scheduling time, the pod will not be scheduled onto + /// the node. If the affinity requirements specified by this field + /// cease to be met at some point during pod execution (e.g. due to an + /// update), the system may or may not try to eventually evict the pod + /// from its node. + /// + [JsonProperty(PropertyName = "requiredDuringSchedulingIgnoredDuringExecution")] + public V1NodeSelector RequiredDuringSchedulingIgnoredDuringExecution { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PreferredDuringSchedulingIgnoredDuringExecution != null) + { + foreach (var element in PreferredDuringSchedulingIgnoredDuringExecution) + { + if (element != null) + { + element.Validate(); + } + } + } + if (RequiredDuringSchedulingIgnoredDuringExecution != null) + { + RequiredDuringSchedulingIgnoredDuringExecution.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1NodeCondition.cs b/src/generated/Models/V1NodeCondition.cs new file mode 100755 index 000000000..8e990472c --- /dev/null +++ b/src/generated/Models/V1NodeCondition.cs @@ -0,0 +1,110 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// NodeCondition contains condition information for a node. + /// + public partial class V1NodeCondition + { + /// + /// Initializes a new instance of the V1NodeCondition class. + /// + public V1NodeCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NodeCondition class. + /// + /// Status of the condition, one of True, False, + /// Unknown. + /// Type of node condition. + /// Last time we got an update on a + /// given condition. + /// Last time the condition transit + /// from one status to another. + /// Human readable message indicating details + /// about last transition. + /// (brief) reason for the condition's last + /// transition. + public V1NodeCondition(string status, string type, System.DateTime? lastHeartbeatTime = default(System.DateTime?), System.DateTime? lastTransitionTime = default(System.DateTime?), string message = default(string), string reason = default(string)) + { + LastHeartbeatTime = lastHeartbeatTime; + LastTransitionTime = lastTransitionTime; + Message = message; + Reason = reason; + Status = status; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets last time we got an update on a given condition. + /// + [JsonProperty(PropertyName = "lastHeartbeatTime")] + public System.DateTime? LastHeartbeatTime { get; set; } + + /// + /// Gets or sets last time the condition transit from one status to + /// another. + /// + [JsonProperty(PropertyName = "lastTransitionTime")] + public System.DateTime? LastTransitionTime { get; set; } + + /// + /// Gets or sets human readable message indicating details about last + /// transition. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets (brief) reason for the condition's last transition. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets status of the condition, one of True, False, Unknown. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets type of node condition. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Status"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/src/generated/Models/V1NodeDaemonEndpoints.cs b/src/generated/Models/V1NodeDaemonEndpoints.cs new file mode 100755 index 000000000..637c36bd9 --- /dev/null +++ b/src/generated/Models/V1NodeDaemonEndpoints.cs @@ -0,0 +1,59 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// NodeDaemonEndpoints lists ports opened by daemons running on the Node. + /// + public partial class V1NodeDaemonEndpoints + { + /// + /// Initializes a new instance of the V1NodeDaemonEndpoints class. + /// + public V1NodeDaemonEndpoints() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NodeDaemonEndpoints class. + /// + /// Endpoint on which Kubelet is + /// listening. + public V1NodeDaemonEndpoints(V1DaemonEndpoint kubeletEndpoint = default(V1DaemonEndpoint)) + { + KubeletEndpoint = kubeletEndpoint; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets endpoint on which Kubelet is listening. + /// + [JsonProperty(PropertyName = "kubeletEndpoint")] + public V1DaemonEndpoint KubeletEndpoint { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (KubeletEndpoint != null) + { + KubeletEndpoint.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1NodeList.cs b/src/generated/Models/V1NodeList.cs new file mode 100755 index 000000000..1969279fc --- /dev/null +++ b/src/generated/Models/V1NodeList.cs @@ -0,0 +1,114 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// NodeList is the whole list of all Nodes which have been registered with + /// master. + /// + public partial class V1NodeList + { + /// + /// Initializes a new instance of the V1NodeList class. + /// + public V1NodeList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NodeList class. + /// + /// List of nodes + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1NodeList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of nodes + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1NodeSelector.cs b/src/generated/Models/V1NodeSelector.cs new file mode 100755 index 000000000..6479f9bfd --- /dev/null +++ b/src/generated/Models/V1NodeSelector.cs @@ -0,0 +1,75 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// 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. + /// + public partial class V1NodeSelector + { + /// + /// Initializes a new instance of the V1NodeSelector class. + /// + public V1NodeSelector() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NodeSelector class. + /// + /// Required. A list of node selector + /// terms. The terms are ORed. + public V1NodeSelector(IList nodeSelectorTerms) + { + NodeSelectorTerms = nodeSelectorTerms; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets required. A list of node selector terms. The terms are + /// ORed. + /// + [JsonProperty(PropertyName = "nodeSelectorTerms")] + public IList NodeSelectorTerms { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (NodeSelectorTerms == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "NodeSelectorTerms"); + } + if (NodeSelectorTerms != null) + { + foreach (var element in NodeSelectorTerms) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1NodeSelectorRequirement.cs b/src/generated/Models/V1NodeSelectorRequirement.cs new file mode 100755 index 000000000..cc41d9703 --- /dev/null +++ b/src/generated/Models/V1NodeSelectorRequirement.cs @@ -0,0 +1,96 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A node selector requirement is a selector that contains values, a key, + /// and an operator that relates the key and values. + /// + public partial class V1NodeSelectorRequirement + { + /// + /// Initializes a new instance of the V1NodeSelectorRequirement class. + /// + public V1NodeSelectorRequirement() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NodeSelectorRequirement class. + /// + /// The label key that the selector applies + /// to. + /// Represents a key's relationship to a + /// set of values. Valid operators are In, NotIn, Exists, DoesNotExist. + /// Gt, and Lt. + /// An array of string values. If the operator is + /// In or NotIn, the values array must be non-empty. If the operator is + /// Exists or DoesNotExist, the values array must be empty. If the + /// operator is Gt or Lt, the values array must have a single element, + /// which will be interpreted as an integer. This array is replaced + /// during a strategic merge patch. + public V1NodeSelectorRequirement(string key, string operatorProperty, IList values = default(IList)) + { + Key = key; + OperatorProperty = operatorProperty; + Values = values; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the label key that the selector applies to. + /// + [JsonProperty(PropertyName = "key")] + public string Key { get; set; } + + /// + /// Gets or sets represents a key's relationship to a set of values. + /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets an array of string values. If the operator is In or + /// NotIn, the values array must be non-empty. If the operator is + /// Exists or DoesNotExist, the values array must be empty. If the + /// operator is Gt or Lt, the values array must have a single element, + /// which will be interpreted as an integer. This array is replaced + /// during a strategic merge patch. + /// + [JsonProperty(PropertyName = "values")] + public IList Values { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Key == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Key"); + } + if (OperatorProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty"); + } + } + } +} diff --git a/src/generated/Models/V1NodeSelectorTerm.cs b/src/generated/Models/V1NodeSelectorTerm.cs new file mode 100755 index 000000000..eb99760db --- /dev/null +++ b/src/generated/Models/V1NodeSelectorTerm.cs @@ -0,0 +1,73 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A null or empty node selector term matches no objects. + /// + public partial class V1NodeSelectorTerm + { + /// + /// Initializes a new instance of the V1NodeSelectorTerm class. + /// + public V1NodeSelectorTerm() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NodeSelectorTerm class. + /// + /// Required. A list of node selector + /// requirements. The requirements are ANDed. + public V1NodeSelectorTerm(IList matchExpressions) + { + MatchExpressions = matchExpressions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets required. A list of node selector requirements. The + /// requirements are ANDed. + /// + [JsonProperty(PropertyName = "matchExpressions")] + public IList MatchExpressions { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (MatchExpressions == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MatchExpressions"); + } + if (MatchExpressions != null) + { + foreach (var element in MatchExpressions) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1NodeSpec.cs b/src/generated/Models/V1NodeSpec.cs new file mode 100755 index 000000000..e4f0102fd --- /dev/null +++ b/src/generated/Models/V1NodeSpec.cs @@ -0,0 +1,92 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// NodeSpec describes the attributes that a node is created with. + /// + public partial class V1NodeSpec + { + /// + /// Initializes a new instance of the V1NodeSpec class. + /// + public V1NodeSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NodeSpec class. + /// + /// External ID of the node assigned by some + /// machine database (e.g. a cloud provider). Deprecated. + /// PodCIDR represents the pod IP range assigned + /// to the node. + /// ID of the node assigned by the cloud + /// provider in the format: + /// <ProviderName>://<ProviderSpecificNodeID> + /// If specified, the node's taints. + /// Unschedulable controls node + /// schedulability of new pods. By default, node is schedulable. More + /// info: + /// http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration + public V1NodeSpec(string externalID = default(string), string podCIDR = default(string), string providerID = default(string), IList taints = default(IList), bool? unschedulable = default(bool?)) + { + ExternalID = externalID; + PodCIDR = podCIDR; + ProviderID = providerID; + Taints = taints; + Unschedulable = unschedulable; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets external ID of the node assigned by some machine + /// database (e.g. a cloud provider). Deprecated. + /// + [JsonProperty(PropertyName = "externalID")] + public string ExternalID { get; set; } + + /// + /// Gets or sets podCIDR represents the pod IP range assigned to the + /// node. + /// + [JsonProperty(PropertyName = "podCIDR")] + public string PodCIDR { get; set; } + + /// + /// Gets or sets ID of the node assigned by the cloud provider in the + /// format: + /// &lt;ProviderName&gt;://&lt;ProviderSpecificNodeID&gt; + /// + [JsonProperty(PropertyName = "providerID")] + public string ProviderID { get; set; } + + /// + /// Gets or sets if specified, the node's taints. + /// + [JsonProperty(PropertyName = "taints")] + public IList Taints { get; set; } + + /// + /// Gets or sets unschedulable controls node schedulability of new + /// pods. By default, node is schedulable. More info: + /// http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration + /// + [JsonProperty(PropertyName = "unschedulable")] + public bool? Unschedulable { get; set; } + + } +} diff --git a/src/generated/Models/V1NodeStatus.cs b/src/generated/Models/V1NodeStatus.cs new file mode 100755 index 000000000..6d6f2d314 --- /dev/null +++ b/src/generated/Models/V1NodeStatus.cs @@ -0,0 +1,206 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// NodeStatus is information about the current status of a node. + /// + public partial class V1NodeStatus + { + /// + /// Initializes a new instance of the V1NodeStatus class. + /// + public V1NodeStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NodeStatus class. + /// + /// List of addresses reachable to the node. + /// Queried from cloud provider, if available. More info: + /// http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses + /// Allocatable represents the resources of a + /// node that are available for scheduling. Defaults to + /// Capacity. + /// Capacity represents the total resources of a + /// node. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#capacity + /// for more details. + /// Conditions is an array of current observed + /// node conditions. More info: + /// http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition + /// Endpoints of daemons running on the + /// Node. + /// List of container images on this node + /// Set of ids/uuids to uniquely identify the + /// node. More info: + /// http://releases.k8s.io/HEAD/docs/admin/node.md#node-info + /// NodePhase is the recently observed lifecycle + /// phase of the node. More info: + /// http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase The field + /// is never populated, and now is deprecated. + /// List of volumes that are attached to + /// the node. + /// List of attachable volumes in use + /// (mounted) by the node. + public V1NodeStatus(IList addresses = default(IList), IDictionary allocatable = default(IDictionary), IDictionary capacity = default(IDictionary), IList conditions = default(IList), V1NodeDaemonEndpoints daemonEndpoints = default(V1NodeDaemonEndpoints), IList images = default(IList), V1NodeSystemInfo nodeInfo = default(V1NodeSystemInfo), string phase = default(string), IList volumesAttached = default(IList), IList volumesInUse = default(IList)) + { + Addresses = addresses; + Allocatable = allocatable; + Capacity = capacity; + Conditions = conditions; + DaemonEndpoints = daemonEndpoints; + Images = images; + NodeInfo = nodeInfo; + Phase = phase; + VolumesAttached = volumesAttached; + VolumesInUse = volumesInUse; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of addresses reachable to the node. Queried from + /// cloud provider, if available. More info: + /// http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses + /// + [JsonProperty(PropertyName = "addresses")] + public IList Addresses { get; set; } + + /// + /// Gets or sets allocatable represents the resources of a node that + /// are available for scheduling. Defaults to Capacity. + /// + [JsonProperty(PropertyName = "allocatable")] + public IDictionary Allocatable { get; set; } + + /// + /// Gets or sets capacity represents the total resources of a node. + /// More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#capacity + /// for more details. + /// + [JsonProperty(PropertyName = "capacity")] + public IDictionary Capacity { get; set; } + + /// + /// Gets or sets conditions is an array of current observed node + /// conditions. More info: + /// http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition + /// + [JsonProperty(PropertyName = "conditions")] + public IList Conditions { get; set; } + + /// + /// Gets or sets endpoints of daemons running on the Node. + /// + [JsonProperty(PropertyName = "daemonEndpoints")] + public V1NodeDaemonEndpoints DaemonEndpoints { get; set; } + + /// + /// Gets or sets list of container images on this node + /// + [JsonProperty(PropertyName = "images")] + public IList Images { get; set; } + + /// + /// Gets or sets set of ids/uuids to uniquely identify the node. More + /// info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-info + /// + [JsonProperty(PropertyName = "nodeInfo")] + public V1NodeSystemInfo NodeInfo { get; set; } + + /// + /// Gets or sets nodePhase is the recently observed lifecycle phase of + /// the node. More info: + /// http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase The field + /// is never populated, and now is deprecated. + /// + [JsonProperty(PropertyName = "phase")] + public string Phase { get; set; } + + /// + /// Gets or sets list of volumes that are attached to the node. + /// + [JsonProperty(PropertyName = "volumesAttached")] + public IList VolumesAttached { get; set; } + + /// + /// Gets or sets list of attachable volumes in use (mounted) by the + /// node. + /// + [JsonProperty(PropertyName = "volumesInUse")] + public IList VolumesInUse { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Addresses != null) + { + foreach (var element in Addresses) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Conditions != null) + { + foreach (var element1 in Conditions) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (DaemonEndpoints != null) + { + DaemonEndpoints.Validate(); + } + if (Images != null) + { + foreach (var element2 in Images) + { + if (element2 != null) + { + element2.Validate(); + } + } + } + if (NodeInfo != null) + { + NodeInfo.Validate(); + } + if (VolumesAttached != null) + { + foreach (var element3 in VolumesAttached) + { + if (element3 != null) + { + element3.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1NodeSystemInfo.cs b/src/generated/Models/V1NodeSystemInfo.cs new file mode 100755 index 000000000..dd5a4f956 --- /dev/null +++ b/src/generated/Models/V1NodeSystemInfo.cs @@ -0,0 +1,190 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// NodeSystemInfo is a set of ids/uuids to uniquely identify the node. + /// + public partial class V1NodeSystemInfo + { + /// + /// Initializes a new instance of the V1NodeSystemInfo class. + /// + public V1NodeSystemInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NodeSystemInfo class. + /// + /// The Architecture reported by the + /// node + /// Boot ID reported by the node. + /// ContainerRuntime Version + /// reported by the node through runtime remote API (e.g. + /// docker://1.5.0). + /// Kernel Version reported by the node + /// from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). + /// KubeProxy Version reported by the + /// node. + /// Kubelet Version reported by the + /// node. + /// MachineID reported by the node. For unique + /// machine identification in the cluster this field is prefered. Learn + /// more from man(5) machine-id: + /// http://man7.org/linux/man-pages/man5/machine-id.5.html + /// The Operating System reported by the + /// node + /// OS Image reported by the node from + /// /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). + /// SystemUUID reported by the node. For + /// unique machine identification MachineID is prefered. This field is + /// specific to Red Hat hosts + /// https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html + public V1NodeSystemInfo(string architecture, string bootID, string containerRuntimeVersion, string kernelVersion, string kubeProxyVersion, string kubeletVersion, string machineID, string operatingSystem, string osImage, string systemUUID) + { + Architecture = architecture; + BootID = bootID; + ContainerRuntimeVersion = containerRuntimeVersion; + KernelVersion = kernelVersion; + KubeProxyVersion = kubeProxyVersion; + KubeletVersion = kubeletVersion; + MachineID = machineID; + OperatingSystem = operatingSystem; + OsImage = osImage; + SystemUUID = systemUUID; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Architecture reported by the node + /// + [JsonProperty(PropertyName = "architecture")] + public string Architecture { get; set; } + + /// + /// Gets or sets boot ID reported by the node. + /// + [JsonProperty(PropertyName = "bootID")] + public string BootID { get; set; } + + /// + /// Gets or sets containerRuntime Version reported by the node through + /// runtime remote API (e.g. docker://1.5.0). + /// + [JsonProperty(PropertyName = "containerRuntimeVersion")] + public string ContainerRuntimeVersion { get; set; } + + /// + /// Gets or sets kernel Version reported by the node from 'uname -r' + /// (e.g. 3.16.0-0.bpo.4-amd64). + /// + [JsonProperty(PropertyName = "kernelVersion")] + public string KernelVersion { get; set; } + + /// + /// Gets or sets kubeProxy Version reported by the node. + /// + [JsonProperty(PropertyName = "kubeProxyVersion")] + public string KubeProxyVersion { get; set; } + + /// + /// Gets or sets kubelet Version reported by the node. + /// + [JsonProperty(PropertyName = "kubeletVersion")] + public string KubeletVersion { get; set; } + + /// + /// Gets or sets machineID reported by the node. For unique machine + /// identification in the cluster this field is prefered. Learn more + /// from man(5) machine-id: + /// http://man7.org/linux/man-pages/man5/machine-id.5.html + /// + [JsonProperty(PropertyName = "machineID")] + public string MachineID { get; set; } + + /// + /// Gets or sets the Operating System reported by the node + /// + [JsonProperty(PropertyName = "operatingSystem")] + public string OperatingSystem { get; set; } + + /// + /// Gets or sets OS Image reported by the node from /etc/os-release + /// (e.g. Debian GNU/Linux 7 (wheezy)). + /// + [JsonProperty(PropertyName = "osImage")] + public string OsImage { get; set; } + + /// + /// Gets or sets systemUUID reported by the node. For unique machine + /// identification MachineID is prefered. This field is specific to Red + /// Hat hosts + /// https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html + /// + [JsonProperty(PropertyName = "systemUUID")] + public string SystemUUID { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Architecture == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Architecture"); + } + if (BootID == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "BootID"); + } + if (ContainerRuntimeVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ContainerRuntimeVersion"); + } + if (KernelVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "KernelVersion"); + } + if (KubeProxyVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "KubeProxyVersion"); + } + if (KubeletVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "KubeletVersion"); + } + if (MachineID == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MachineID"); + } + if (OperatingSystem == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatingSystem"); + } + if (OsImage == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OsImage"); + } + if (SystemUUID == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SystemUUID"); + } + } + } +} diff --git a/src/generated/Models/V1NonResourceAttributes.cs b/src/generated/Models/V1NonResourceAttributes.cs new file mode 100755 index 000000000..7982f9c2e --- /dev/null +++ b/src/generated/Models/V1NonResourceAttributes.cs @@ -0,0 +1,54 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// NonResourceAttributes includes the authorization attributes available + /// for non-resource requests to the Authorizer interface + /// + public partial class V1NonResourceAttributes + { + /// + /// Initializes a new instance of the V1NonResourceAttributes class. + /// + public V1NonResourceAttributes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1NonResourceAttributes class. + /// + /// Path is the URL path of the request + /// Verb is the standard HTTP verb + public V1NonResourceAttributes(string path = default(string), string verb = default(string)) + { + Path = path; + Verb = verb; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets path is the URL path of the request + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or sets verb is the standard HTTP verb + /// + [JsonProperty(PropertyName = "verb")] + public string Verb { get; set; } + + } +} diff --git a/src/generated/Models/V1ObjectFieldSelector.cs b/src/generated/Models/V1ObjectFieldSelector.cs new file mode 100755 index 000000000..0ceba6283 --- /dev/null +++ b/src/generated/Models/V1ObjectFieldSelector.cs @@ -0,0 +1,71 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ObjectFieldSelector selects an APIVersioned field of an object. + /// + public partial class V1ObjectFieldSelector + { + /// + /// Initializes a new instance of the V1ObjectFieldSelector class. + /// + public V1ObjectFieldSelector() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ObjectFieldSelector class. + /// + /// Path of the field to select in the + /// specified API version. + /// Version of the schema the FieldPath is + /// written in terms of, defaults to "v1". + public V1ObjectFieldSelector(string fieldPath, string apiVersion = default(string)) + { + ApiVersion = apiVersion; + FieldPath = fieldPath; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets version of the schema the FieldPath is written in + /// terms of, defaults to "v1". + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets path of the field to select in the specified API + /// version. + /// + [JsonProperty(PropertyName = "fieldPath")] + public string FieldPath { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (FieldPath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "FieldPath"); + } + } + } +} diff --git a/src/generated/Models/V1ObjectMeta.cs b/src/generated/Models/V1ObjectMeta.cs new file mode 100755 index 000000000..337739916 --- /dev/null +++ b/src/generated/Models/V1ObjectMeta.cs @@ -0,0 +1,353 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ObjectMeta is metadata that all persisted resources must have, which + /// includes all objects users must create. + /// + public partial class V1ObjectMeta + { + /// + /// Initializes a new instance of the V1ObjectMeta class. + /// + public V1ObjectMeta() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ObjectMeta class. + /// + /// Annotations is an unstructured key value + /// map stored with a resource that may be set by external tools to + /// store and retrieve arbitrary metadata. They are not queryable and + /// should be preserved when modifying objects. More info: + /// http://kubernetes.io/docs/user-guide/annotations + /// The name of the cluster which the object + /// belongs to. This is used to distinguish resources with same name + /// and namespace in different clusters. This field is not set anywhere + /// right now and apiserver is going to ignore it if set in create or + /// update request. + /// CreationTimestamp is a timestamp + /// representing the server time when this object was created. It is + /// not guaranteed to be set in happens-before order across separate + /// operations. Clients may not set this value. It is represented in + /// RFC3339 form and is in UTC. + /// + /// Populated by the system. Read-only. Null for lists. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Number of seconds allowed + /// for this object to gracefully terminate before it will be removed + /// from the system. Only set when deletionTimestamp is also set. May + /// only be shortened. Read-only. + /// DeletionTimestamp is RFC 3339 date + /// and time at which this resource will be deleted. This field is set + /// by the server when a graceful deletion is requested by the user, + /// and is not directly settable by a client. The resource is expected + /// to be deleted (no longer visible from resource lists, and not + /// reachable by name) after the time in this field. Once set, this + /// value may not be unset or be set further into the future, although + /// it may be shortened or the resource may be deleted prior to this + /// time. For example, a user may request that a pod is deleted in 30 + /// seconds. The Kubelet will react by sending a graceful termination + /// signal to the containers in the pod. After that 30 seconds, the + /// Kubelet will send a hard termination signal (SIGKILL) to the + /// container and after cleanup, remove the pod from the API. In the + /// presence of network partitions, this object may still exist after + /// this timestamp, until an administrator or automated process can + /// determine the resource is fully terminated. If not set, graceful + /// deletion of the object has not been requested. + /// + /// Populated by the system when a graceful deletion is requested. + /// Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Must be empty before the object is deleted + /// from the registry. Each entry is an identifier for the responsible + /// component that will remove the entry from the list. If the + /// deletionTimestamp of the object is non-nil, entries in this list + /// can only be removed. + /// GenerateName is an optional prefix, used + /// by the server, to generate a unique name ONLY IF the Name field has + /// not been provided. If this field is used, the name returned to the + /// client will be different than the name passed. This value will also + /// be combined with a unique suffix. The provided value has the same + /// validation rules as the Name field, and may be truncated by the + /// length of the suffix required to make the value unique on the + /// server. + /// + /// If this field is specified and the generated name exists, the + /// server will NOT return a 409 - instead, it will either return 201 + /// Created or 500 with Reason ServerTimeout indicating a unique name + /// could not be found in the time allotted, and the client should + /// retry (optionally after the time indicated in the Retry-After + /// header). + /// + /// Applied only if Name is not specified. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency + /// A sequence number representing a specific + /// generation of the desired state. Populated by the system. + /// Read-only. + /// Map of string keys and values that can be used + /// to organize and categorize (scope and select) objects. May match + /// selectors of replication controllers and services. More info: + /// http://kubernetes.io/docs/user-guide/labels + /// Name must be unique within a namespace. Is + /// required when creating resources, although some resources may allow + /// a client to request the generation of an appropriate name + /// automatically. Name is primarily intended for creation idempotence + /// and configuration definition. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// Namespace defines the space within + /// each name must be unique. An empty namespace is equivalent to the + /// "default" namespace, but "default" is the canonical representation. + /// Not all objects are required to be scoped to a namespace - the + /// value of this field for those objects will be empty. + /// + /// Must be a DNS_LABEL. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/namespaces + /// List of objects depended by this + /// object. If ALL objects in the list have been deleted, this object + /// will be garbage collected. If this object is managed by a + /// controller, then an entry in this list will point to this + /// controller, with the controller field set to true. There cannot be + /// more than one managing controller. + /// An opaque value that represents the + /// internal version of this object that can be used by clients to + /// determine when objects have changed. May be used for optimistic + /// concurrency, change detection, and the watch operation on a + /// resource or set of resources. Clients must treat these values as + /// opaque and passed unmodified back to the server. They may only be + /// valid for a particular resource or set of resources. + /// + /// Populated by the system. Read-only. Value must be treated as opaque + /// by clients and . More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + /// SelfLink is a URL representing this object. + /// Populated by the system. Read-only. + /// UID is the unique in time and space value for + /// this object. It is typically generated by the server on successful + /// creation of a resource and is not allowed to change on PUT + /// operations. + /// + /// Populated by the system. Read-only. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#uids + public V1ObjectMeta(IDictionary annotations = default(IDictionary), string clusterName = default(string), System.DateTime? creationTimestamp = default(System.DateTime?), long? deletionGracePeriodSeconds = default(long?), System.DateTime? deletionTimestamp = default(System.DateTime?), IList finalizers = default(IList), string generateName = default(string), long? generation = default(long?), IDictionary labels = default(IDictionary), string name = default(string), string namespaceProperty = default(string), IList ownerReferences = default(IList), string resourceVersion = default(string), string selfLink = default(string), string uid = default(string)) + { + Annotations = annotations; + ClusterName = clusterName; + CreationTimestamp = creationTimestamp; + DeletionGracePeriodSeconds = deletionGracePeriodSeconds; + DeletionTimestamp = deletionTimestamp; + Finalizers = finalizers; + GenerateName = generateName; + Generation = generation; + Labels = labels; + Name = name; + NamespaceProperty = namespaceProperty; + OwnerReferences = ownerReferences; + ResourceVersion = resourceVersion; + SelfLink = selfLink; + Uid = uid; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets annotations is an unstructured key value map stored + /// with a resource that may be set by external tools to store and + /// retrieve arbitrary metadata. They are not queryable and should be + /// preserved when modifying objects. More info: + /// http://kubernetes.io/docs/user-guide/annotations + /// + [JsonProperty(PropertyName = "annotations")] + public IDictionary Annotations { get; set; } + + /// + /// Gets or sets the name of the cluster which the object belongs to. + /// This is used to distinguish resources with same name and namespace + /// in different clusters. This field is not set anywhere right now and + /// apiserver is going to ignore it if set in create or update request. + /// + [JsonProperty(PropertyName = "clusterName")] + public string ClusterName { get; set; } + + /// + /// Gets or sets creationTimestamp is a timestamp representing the + /// server time when this object was created. It is not guaranteed to + /// be set in happens-before order across separate operations. Clients + /// may not set this value. It is represented in RFC3339 form and is in + /// UTC. + /// + /// Populated by the system. Read-only. Null for lists. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "creationTimestamp")] + public System.DateTime? CreationTimestamp { get; set; } + + /// + /// Gets or sets number of seconds allowed for this object to + /// gracefully terminate before it will be removed from the system. + /// Only set when deletionTimestamp is also set. May only be shortened. + /// Read-only. + /// + [JsonProperty(PropertyName = "deletionGracePeriodSeconds")] + public long? DeletionGracePeriodSeconds { get; set; } + + /// + /// Gets or sets deletionTimestamp is RFC 3339 date and time at which + /// this resource will be deleted. This field is set by the server when + /// a graceful deletion is requested by the user, and is not directly + /// settable by a client. The resource is expected to be deleted (no + /// longer visible from resource lists, and not reachable by name) + /// after the time in this field. Once set, this value may not be unset + /// or be set further into the future, although it may be shortened or + /// the resource may be deleted prior to this time. For example, a user + /// may request that a pod is deleted in 30 seconds. The Kubelet will + /// react by sending a graceful termination signal to the containers in + /// the pod. After that 30 seconds, the Kubelet will send a hard + /// termination signal (SIGKILL) to the container and after cleanup, + /// remove the pod from the API. In the presence of network partitions, + /// this object may still exist after this timestamp, until an + /// administrator or automated process can determine the resource is + /// fully terminated. If not set, graceful deletion of the object has + /// not been requested. + /// + /// Populated by the system when a graceful deletion is requested. + /// Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "deletionTimestamp")] + public System.DateTime? DeletionTimestamp { get; set; } + + /// + /// Gets or sets must be empty before the object is deleted from the + /// registry. Each entry is an identifier for the responsible component + /// that will remove the entry from the list. If the deletionTimestamp + /// of the object is non-nil, entries in this list can only be removed. + /// + [JsonProperty(PropertyName = "finalizers")] + public IList Finalizers { get; set; } + + /// + /// Gets or sets generateName is an optional prefix, used by the + /// server, to generate a unique name ONLY IF the Name field has not + /// been provided. If this field is used, the name returned to the + /// client will be different than the name passed. This value will also + /// be combined with a unique suffix. The provided value has the same + /// validation rules as the Name field, and may be truncated by the + /// length of the suffix required to make the value unique on the + /// server. + /// + /// If this field is specified and the generated name exists, the + /// server will NOT return a 409 - instead, it will either return 201 + /// Created or 500 with Reason ServerTimeout indicating a unique name + /// could not be found in the time allotted, and the client should + /// retry (optionally after the time indicated in the Retry-After + /// header). + /// + /// Applied only if Name is not specified. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency + /// + [JsonProperty(PropertyName = "generateName")] + public string GenerateName { get; set; } + + /// + /// Gets or sets a sequence number representing a specific generation + /// of the desired state. Populated by the system. Read-only. + /// + [JsonProperty(PropertyName = "generation")] + public long? Generation { get; set; } + + /// + /// Gets or sets map of string keys and values that can be used to + /// organize and categorize (scope and select) objects. May match + /// selectors of replication controllers and services. More info: + /// http://kubernetes.io/docs/user-guide/labels + /// + [JsonProperty(PropertyName = "labels")] + public IDictionary Labels { get; set; } + + /// + /// Gets or sets name must be unique within a namespace. Is required + /// when creating resources, although some resources may allow a client + /// to request the generation of an appropriate name automatically. + /// Name is primarily intended for creation idempotence and + /// configuration definition. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets namespace defines the space within each name must be + /// unique. An empty namespace is equivalent to the "default" + /// namespace, but "default" is the canonical representation. Not all + /// objects are required to be scoped to a namespace - the value of + /// this field for those objects will be empty. + /// + /// Must be a DNS_LABEL. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/namespaces + /// + [JsonProperty(PropertyName = "namespace")] + public string NamespaceProperty { get; set; } + + /// + /// Gets or sets list of objects depended by this object. If ALL + /// objects in the list have been deleted, this object will be garbage + /// collected. If this object is managed by a controller, then an entry + /// in this list will point to this controller, with the controller + /// field set to true. There cannot be more than one managing + /// controller. + /// + [JsonProperty(PropertyName = "ownerReferences")] + public IList OwnerReferences { get; set; } + + /// + /// Gets or sets an opaque value that represents the internal version + /// of this object that can be used by clients to determine when + /// objects have changed. May be used for optimistic concurrency, + /// change detection, and the watch operation on a resource or set of + /// resources. Clients must treat these values as opaque and passed + /// unmodified back to the server. They may only be valid for a + /// particular resource or set of resources. + /// + /// Populated by the system. Read-only. Value must be treated as opaque + /// by clients and . More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + /// + [JsonProperty(PropertyName = "resourceVersion")] + public string ResourceVersion { get; set; } + + /// + /// Gets or sets selfLink is a URL representing this object. Populated + /// by the system. Read-only. + /// + [JsonProperty(PropertyName = "selfLink")] + public string SelfLink { get; set; } + + /// + /// Gets or sets UID is the unique in time and space value for this + /// object. It is typically generated by the server on successful + /// creation of a resource and is not allowed to change on PUT + /// operations. + /// + /// Populated by the system. Read-only. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#uids + /// + [JsonProperty(PropertyName = "uid")] + public string Uid { get; set; } + + } +} diff --git a/src/generated/Models/V1ObjectReference.cs b/src/generated/Models/V1ObjectReference.cs new file mode 100755 index 000000000..e85d3fecb --- /dev/null +++ b/src/generated/Models/V1ObjectReference.cs @@ -0,0 +1,123 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ObjectReference contains enough information to let you inspect or + /// modify the referred object. + /// + public partial class V1ObjectReference + { + /// + /// Initializes a new instance of the V1ObjectReference class. + /// + public V1ObjectReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ObjectReference class. + /// + /// API version of the referent. + /// If referring to a piece of an object + /// instead of an entire object, this string should contain a valid + /// JSON/Go field access statement, such as + /// desiredState.manifest.containers[2]. For example, if the object + /// reference is to a container within a pod, this would take on a + /// value like: "spec.containers{name}" (where "name" refers to the + /// name of the container that triggered the event) or if no container + /// name is specified "spec.containers[2]" (container with index 2 in + /// this pod). This syntax is chosen only to have some well-defined way + /// of referencing a part of an object. + /// Kind of the referent. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// Namespace of the referent. More + /// info: http://kubernetes.io/docs/user-guide/namespaces + /// Specific resourceVersion to which + /// this reference is made, if any. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + /// UID of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#uids + public V1ObjectReference(string apiVersion = default(string), string fieldPath = default(string), string kind = default(string), string name = default(string), string namespaceProperty = default(string), string resourceVersion = default(string), string uid = default(string)) + { + ApiVersion = apiVersion; + FieldPath = fieldPath; + Kind = kind; + Name = name; + NamespaceProperty = namespaceProperty; + ResourceVersion = resourceVersion; + Uid = uid; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets API version of the referent. + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets if referring to a piece of an object instead of an + /// entire object, this string should contain a valid JSON/Go field + /// access statement, such as desiredState.manifest.containers[2]. For + /// example, if the object reference is to a container within a pod, + /// this would take on a value like: "spec.containers{name}" (where + /// "name" refers to the name of the container that triggered the + /// event) or if no container name is specified "spec.containers[2]" + /// (container with index 2 in this pod). This syntax is chosen only to + /// have some well-defined way of referencing a part of an object. + /// + [JsonProperty(PropertyName = "fieldPath")] + public string FieldPath { get; set; } + + /// + /// Gets or sets kind of the referent. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets namespace of the referent. More info: + /// http://kubernetes.io/docs/user-guide/namespaces + /// + [JsonProperty(PropertyName = "namespace")] + public string NamespaceProperty { get; set; } + + /// + /// Gets or sets specific resourceVersion to which this reference is + /// made, if any. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency + /// + [JsonProperty(PropertyName = "resourceVersion")] + public string ResourceVersion { get; set; } + + /// + /// Gets or sets UID of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#uids + /// + [JsonProperty(PropertyName = "uid")] + public string Uid { get; set; } + + } +} diff --git a/src/generated/Models/V1OwnerReference.cs b/src/generated/Models/V1OwnerReference.cs new file mode 100755 index 000000000..4e9f470c9 --- /dev/null +++ b/src/generated/Models/V1OwnerReference.cs @@ -0,0 +1,130 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// OwnerReference contains enough information to let you identify an + /// owning object. Currently, an owning object must be in the same + /// namespace, so there is no namespace field. + /// + public partial class V1OwnerReference + { + /// + /// Initializes a new instance of the V1OwnerReference class. + /// + public V1OwnerReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1OwnerReference class. + /// + /// API version of the referent. + /// Kind of the referent. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// UID of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#uids + /// If true, AND if the owner has the + /// "foregroundDeletion" finalizer, then the owner cannot be deleted + /// from the key-value store until this reference is removed. Defaults + /// to false. To set this field, a user needs "delete" permission of + /// the owner, otherwise 422 (Unprocessable Entity) will be + /// returned. + /// If true, this reference points to the + /// managing controller. + public V1OwnerReference(string apiVersion, string kind, string name, string uid, bool? blockOwnerDeletion = default(bool?), bool? controller = default(bool?)) + { + ApiVersion = apiVersion; + BlockOwnerDeletion = blockOwnerDeletion; + Controller = controller; + Kind = kind; + Name = name; + Uid = uid; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets API version of the referent. + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets if true, AND if the owner has the "foregroundDeletion" + /// finalizer, then the owner cannot be deleted from the key-value + /// store until this reference is removed. Defaults to false. To set + /// this field, a user needs "delete" permission of the owner, + /// otherwise 422 (Unprocessable Entity) will be returned. + /// + [JsonProperty(PropertyName = "blockOwnerDeletion")] + public bool? BlockOwnerDeletion { get; set; } + + /// + /// Gets or sets if true, this reference points to the managing + /// controller. + /// + [JsonProperty(PropertyName = "controller")] + public bool? Controller { get; set; } + + /// + /// Gets or sets kind of the referent. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets UID of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#uids + /// + [JsonProperty(PropertyName = "uid")] + public string Uid { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ApiVersion"); + } + if (Kind == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (Uid == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Uid"); + } + } + } +} diff --git a/src/generated/Models/V1PersistentVolume.cs b/src/generated/Models/V1PersistentVolume.cs new file mode 100755 index 000000000..e9416f1d2 --- /dev/null +++ b/src/generated/Models/V1PersistentVolume.cs @@ -0,0 +1,121 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// PersistentVolume (PV) is a storage resource provisioned by an + /// administrator. It is analogous to a node. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes + /// + public partial class V1PersistentVolume + { + /// + /// Initializes a new instance of the V1PersistentVolume class. + /// + public V1PersistentVolume() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PersistentVolume class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Spec defines a specification of a persistent + /// volume owned by the cluster. Provisioned by an administrator. More + /// info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes + /// Status represents the current + /// information/status for the persistent volume. Populated by the + /// system. Read-only. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes + public V1PersistentVolume(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1PersistentVolumeSpec spec = default(V1PersistentVolumeSpec), V1PersistentVolumeStatus status = default(V1PersistentVolumeStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec defines a specification of a persistent volume + /// owned by the cluster. Provisioned by an administrator. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes + /// + [JsonProperty(PropertyName = "spec")] + public V1PersistentVolumeSpec Spec { get; set; } + + /// + /// Gets or sets status represents the current information/status for + /// the persistent volume. Populated by the system. Read-only. More + /// info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes + /// + [JsonProperty(PropertyName = "status")] + public V1PersistentVolumeStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1PersistentVolumeClaim.cs b/src/generated/Models/V1PersistentVolumeClaim.cs new file mode 100755 index 000000000..2f8d74e2b --- /dev/null +++ b/src/generated/Models/V1PersistentVolumeClaim.cs @@ -0,0 +1,105 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// PersistentVolumeClaim is a user's request for and claim to a persistent + /// volume + /// + public partial class V1PersistentVolumeClaim + { + /// + /// Initializes a new instance of the V1PersistentVolumeClaim class. + /// + public V1PersistentVolumeClaim() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PersistentVolumeClaim class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Spec defines the desired characteristics of a + /// volume requested by a pod author. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + /// Status represents the current + /// information/status of a persistent volume claim. Read-only. More + /// info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + public V1PersistentVolumeClaim(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1PersistentVolumeClaimSpec spec = default(V1PersistentVolumeClaimSpec), V1PersistentVolumeClaimStatus status = default(V1PersistentVolumeClaimStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec defines the desired characteristics of a volume + /// requested by a pod author. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + /// + [JsonProperty(PropertyName = "spec")] + public V1PersistentVolumeClaimSpec Spec { get; set; } + + /// + /// Gets or sets status represents the current information/status of a + /// persistent volume claim. Read-only. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + /// + [JsonProperty(PropertyName = "status")] + public V1PersistentVolumeClaimStatus Status { get; set; } + + } +} diff --git a/src/generated/Models/V1PersistentVolumeClaimList.cs b/src/generated/Models/V1PersistentVolumeClaimList.cs new file mode 100755 index 000000000..d7d312e3c --- /dev/null +++ b/src/generated/Models/V1PersistentVolumeClaimList.cs @@ -0,0 +1,107 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PersistentVolumeClaimList is a list of PersistentVolumeClaim items. + /// + public partial class V1PersistentVolumeClaimList + { + /// + /// Initializes a new instance of the V1PersistentVolumeClaimList + /// class. + /// + public V1PersistentVolumeClaimList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PersistentVolumeClaimList + /// class. + /// + /// A list of persistent volume claims. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1PersistentVolumeClaimList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets a list of persistent volume claims. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + } + } +} diff --git a/src/generated/Models/V1PersistentVolumeClaimSpec.cs b/src/generated/Models/V1PersistentVolumeClaimSpec.cs new file mode 100755 index 000000000..f2880d4b0 --- /dev/null +++ b/src/generated/Models/V1PersistentVolumeClaimSpec.cs @@ -0,0 +1,97 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PersistentVolumeClaimSpec describes the common attributes of storage + /// devices and allows a Source for provider-specific attributes + /// + public partial class V1PersistentVolumeClaimSpec + { + /// + /// Initializes a new instance of the V1PersistentVolumeClaimSpec + /// class. + /// + public V1PersistentVolumeClaimSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PersistentVolumeClaimSpec + /// class. + /// + /// AccessModes contains the desired access + /// modes the volume should have. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1 + /// Resources represents the minimum resources + /// the volume should have. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#resources + /// A label query over volumes to consider for + /// binding. + /// Name of the StorageClass required by + /// the claim. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#class-1 + /// VolumeName is the binding reference to the + /// PersistentVolume backing this claim. + public V1PersistentVolumeClaimSpec(IList accessModes = default(IList), V1ResourceRequirements resources = default(V1ResourceRequirements), V1LabelSelector selector = default(V1LabelSelector), string storageClassName = default(string), string volumeName = default(string)) + { + AccessModes = accessModes; + Resources = resources; + Selector = selector; + StorageClassName = storageClassName; + VolumeName = volumeName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets accessModes contains the desired access modes the + /// volume should have. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1 + /// + [JsonProperty(PropertyName = "accessModes")] + public IList AccessModes { get; set; } + + /// + /// Gets or sets resources represents the minimum resources the volume + /// should have. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#resources + /// + [JsonProperty(PropertyName = "resources")] + public V1ResourceRequirements Resources { get; set; } + + /// + /// Gets or sets a label query over volumes to consider for binding. + /// + [JsonProperty(PropertyName = "selector")] + public V1LabelSelector Selector { get; set; } + + /// + /// Gets or sets name of the StorageClass required by the claim. More + /// info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#class-1 + /// + [JsonProperty(PropertyName = "storageClassName")] + public string StorageClassName { get; set; } + + /// + /// Gets or sets volumeName is the binding reference to the + /// PersistentVolume backing this claim. + /// + [JsonProperty(PropertyName = "volumeName")] + public string VolumeName { get; set; } + + } +} diff --git a/src/generated/Models/V1PersistentVolumeClaimStatus.cs b/src/generated/Models/V1PersistentVolumeClaimStatus.cs new file mode 100755 index 000000000..c62f60166 --- /dev/null +++ b/src/generated/Models/V1PersistentVolumeClaimStatus.cs @@ -0,0 +1,74 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PersistentVolumeClaimStatus is the current status of a persistent + /// volume claim. + /// + public partial class V1PersistentVolumeClaimStatus + { + /// + /// Initializes a new instance of the V1PersistentVolumeClaimStatus + /// class. + /// + public V1PersistentVolumeClaimStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PersistentVolumeClaimStatus + /// class. + /// + /// AccessModes contains the actual access + /// modes the volume backing the PVC has. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1 + /// Represents the actual resources of the + /// underlying volume. + /// Phase represents the current phase of + /// PersistentVolumeClaim. + public V1PersistentVolumeClaimStatus(IList accessModes = default(IList), IDictionary capacity = default(IDictionary), string phase = default(string)) + { + AccessModes = accessModes; + Capacity = capacity; + Phase = phase; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets accessModes contains the actual access modes the + /// volume backing the PVC has. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1 + /// + [JsonProperty(PropertyName = "accessModes")] + public IList AccessModes { get; set; } + + /// + /// Gets or sets represents the actual resources of the underlying + /// volume. + /// + [JsonProperty(PropertyName = "capacity")] + public IDictionary Capacity { get; set; } + + /// + /// Gets or sets phase represents the current phase of + /// PersistentVolumeClaim. + /// + [JsonProperty(PropertyName = "phase")] + public string Phase { get; set; } + + } +} diff --git a/src/generated/Models/V1PersistentVolumeClaimVolumeSource.cs b/src/generated/Models/V1PersistentVolumeClaimVolumeSource.cs new file mode 100755 index 000000000..efc70b79f --- /dev/null +++ b/src/generated/Models/V1PersistentVolumeClaimVolumeSource.cs @@ -0,0 +1,80 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// PersistentVolumeClaimVolumeSource references the user's PVC in the same + /// namespace. This volume finds the bound PV and mounts that volume for + /// the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper + /// around another type of volume that is owned by someone else (the + /// system). + /// + public partial class V1PersistentVolumeClaimVolumeSource + { + /// + /// Initializes a new instance of the + /// V1PersistentVolumeClaimVolumeSource class. + /// + public V1PersistentVolumeClaimVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V1PersistentVolumeClaimVolumeSource class. + /// + /// ClaimName is the name of a + /// PersistentVolumeClaim in the same namespace as the pod using this + /// volume. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + /// Will force the ReadOnly setting in + /// VolumeMounts. Default false. + public V1PersistentVolumeClaimVolumeSource(string claimName, bool? readOnlyProperty = default(bool?)) + { + ClaimName = claimName; + ReadOnlyProperty = readOnlyProperty; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets claimName is the name of a PersistentVolumeClaim in + /// the same namespace as the pod using this volume. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + /// + [JsonProperty(PropertyName = "claimName")] + public string ClaimName { get; set; } + + /// + /// Gets or sets will force the ReadOnly setting in VolumeMounts. + /// Default false. + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ClaimName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClaimName"); + } + } + } +} diff --git a/src/generated/Models/V1PersistentVolumeList.cs b/src/generated/Models/V1PersistentVolumeList.cs new file mode 100755 index 000000000..fce5dc191 --- /dev/null +++ b/src/generated/Models/V1PersistentVolumeList.cs @@ -0,0 +1,115 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PersistentVolumeList is a list of PersistentVolume items. + /// + public partial class V1PersistentVolumeList + { + /// + /// Initializes a new instance of the V1PersistentVolumeList class. + /// + public V1PersistentVolumeList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PersistentVolumeList class. + /// + /// List of persistent volumes. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1PersistentVolumeList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of persistent volumes. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1PersistentVolumeSpec.cs b/src/generated/Models/V1PersistentVolumeSpec.cs new file mode 100755 index 000000000..4131589c5 --- /dev/null +++ b/src/generated/Models/V1PersistentVolumeSpec.cs @@ -0,0 +1,411 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PersistentVolumeSpec is the specification of a persistent volume. + /// + public partial class V1PersistentVolumeSpec + { + /// + /// Initializes a new instance of the V1PersistentVolumeSpec class. + /// + public V1PersistentVolumeSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PersistentVolumeSpec class. + /// + /// AccessModes contains all ways the volume + /// can be mounted. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes + /// AWSElasticBlockStore represents + /// an AWS Disk resource that is attached to a kubelet's host machine + /// and then exposed to the pod. More info: + /// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + /// AzureDisk represents an Azure Data Disk + /// mount on the host and bind mount to the pod. + /// AzureFile represents an Azure File Service + /// mount on the host and bind mount to the pod. + /// A description of the persistent volume's + /// resources and capacity. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#capacity + /// CephFS represents a Ceph FS mount on the host + /// that shares a pod's lifetime + /// Cinder represents a cinder volume attached and + /// mounted on kubelets host machine More info: + /// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + /// ClaimRef is part of a bi-directional binding + /// between PersistentVolume and PersistentVolumeClaim. Expected to be + /// non-nil when bound. claim.VolumeName is the authoritative bind + /// between PV and PVC. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#binding + /// FC represents a Fibre Channel resource that is + /// attached to a kubelet's host machine and then exposed to the + /// pod. + /// FlexVolume represents a generic volume + /// resource that is provisioned/attached using an exec based plugin. + /// This is an alpha feature and may change in future. + /// Flocker represents a Flocker volume attached + /// to a kubelet's host machine and exposed to the pod for its usage. + /// This depends on the Flocker control service being running + /// GCEPersistentDisk represents a GCE + /// Disk resource that is attached to a kubelet's host machine and then + /// exposed to the pod. Provisioned by an admin. More info: + /// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + /// Glusterfs represents a Glusterfs volume + /// that is attached to a host and exposed to the pod. Provisioned by + /// an admin. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md + /// HostPath represents a directory on the host. + /// Provisioned by a developer or tester. This is useful for + /// single-node development and testing only! On-host storage is not + /// supported in any way and WILL NOT WORK in a multi-node cluster. + /// More info: + /// http://kubernetes.io/docs/user-guide/volumes#hostpath + /// ISCSI represents an ISCSI Disk resource that is + /// attached to a kubelet's host machine and then exposed to the pod. + /// Provisioned by an admin. + /// NFS represents an NFS mount on the host. + /// Provisioned by an admin. More info: + /// http://kubernetes.io/docs/user-guide/volumes#nfs + /// What happens to a + /// persistent volume when released from its claim. Valid options are + /// Retain (default) and Recycle. Recycling must be supported by the + /// volume plugin underlying this persistent volume. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy + /// PhotonPersistentDisk represents + /// a PhotonController persistent disk attached and mounted on kubelets + /// host machine + /// PortworxVolume represents a portworx + /// volume attached and mounted on kubelets host machine + /// Quobyte represents a Quobyte mount on the + /// host that shares a pod's lifetime + /// RBD represents a Rados Block Device mount on the + /// host that shares a pod's lifetime. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md + /// ScaleIO represents a ScaleIO persistent + /// volume attached and mounted on Kubernetes nodes. + /// Name of StorageClass to which this + /// persistent volume belongs. Empty value means that this volume does + /// not belong to any StorageClass. + /// VsphereVolume represents a vSphere + /// volume attached and mounted on kubelets host machine + public V1PersistentVolumeSpec(IList accessModes = default(IList), V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore = default(V1AWSElasticBlockStoreVolumeSource), V1AzureDiskVolumeSource azureDisk = default(V1AzureDiskVolumeSource), V1AzureFileVolumeSource azureFile = default(V1AzureFileVolumeSource), IDictionary capacity = default(IDictionary), V1CephFSVolumeSource cephfs = default(V1CephFSVolumeSource), V1CinderVolumeSource cinder = default(V1CinderVolumeSource), V1ObjectReference claimRef = default(V1ObjectReference), V1FCVolumeSource fc = default(V1FCVolumeSource), V1FlexVolumeSource flexVolume = default(V1FlexVolumeSource), V1FlockerVolumeSource flocker = default(V1FlockerVolumeSource), V1GCEPersistentDiskVolumeSource gcePersistentDisk = default(V1GCEPersistentDiskVolumeSource), V1GlusterfsVolumeSource glusterfs = default(V1GlusterfsVolumeSource), V1HostPathVolumeSource hostPath = default(V1HostPathVolumeSource), V1ISCSIVolumeSource iscsi = default(V1ISCSIVolumeSource), V1NFSVolumeSource nfs = default(V1NFSVolumeSource), string persistentVolumeReclaimPolicy = default(string), V1PhotonPersistentDiskVolumeSource photonPersistentDisk = default(V1PhotonPersistentDiskVolumeSource), V1PortworxVolumeSource portworxVolume = default(V1PortworxVolumeSource), V1QuobyteVolumeSource quobyte = default(V1QuobyteVolumeSource), V1RBDVolumeSource rbd = default(V1RBDVolumeSource), V1ScaleIOVolumeSource scaleIO = default(V1ScaleIOVolumeSource), string storageClassName = default(string), V1VsphereVirtualDiskVolumeSource vsphereVolume = default(V1VsphereVirtualDiskVolumeSource)) + { + AccessModes = accessModes; + AwsElasticBlockStore = awsElasticBlockStore; + AzureDisk = azureDisk; + AzureFile = azureFile; + Capacity = capacity; + Cephfs = cephfs; + Cinder = cinder; + ClaimRef = claimRef; + Fc = fc; + FlexVolume = flexVolume; + Flocker = flocker; + GcePersistentDisk = gcePersistentDisk; + Glusterfs = glusterfs; + HostPath = hostPath; + Iscsi = iscsi; + Nfs = nfs; + PersistentVolumeReclaimPolicy = persistentVolumeReclaimPolicy; + PhotonPersistentDisk = photonPersistentDisk; + PortworxVolume = portworxVolume; + Quobyte = quobyte; + Rbd = rbd; + ScaleIO = scaleIO; + StorageClassName = storageClassName; + VsphereVolume = vsphereVolume; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets accessModes contains all ways the volume can be + /// mounted. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes + /// + [JsonProperty(PropertyName = "accessModes")] + public IList AccessModes { get; set; } + + /// + /// Gets or sets aWSElasticBlockStore represents an AWS Disk resource + /// that is attached to a kubelet's host machine and then exposed to + /// the pod. More info: + /// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + /// + [JsonProperty(PropertyName = "awsElasticBlockStore")] + public V1AWSElasticBlockStoreVolumeSource AwsElasticBlockStore { get; set; } + + /// + /// Gets or sets azureDisk represents an Azure Data Disk mount on the + /// host and bind mount to the pod. + /// + [JsonProperty(PropertyName = "azureDisk")] + public V1AzureDiskVolumeSource AzureDisk { get; set; } + + /// + /// Gets or sets azureFile represents an Azure File Service mount on + /// the host and bind mount to the pod. + /// + [JsonProperty(PropertyName = "azureFile")] + public V1AzureFileVolumeSource AzureFile { get; set; } + + /// + /// Gets or sets a description of the persistent volume's resources and + /// capacity. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#capacity + /// + [JsonProperty(PropertyName = "capacity")] + public IDictionary Capacity { get; set; } + + /// + /// Gets or sets cephFS represents a Ceph FS mount on the host that + /// shares a pod's lifetime + /// + [JsonProperty(PropertyName = "cephfs")] + public V1CephFSVolumeSource Cephfs { get; set; } + + /// + /// Gets or sets cinder represents a cinder volume attached and mounted + /// on kubelets host machine More info: + /// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + /// + [JsonProperty(PropertyName = "cinder")] + public V1CinderVolumeSource Cinder { get; set; } + + /// + /// Gets or sets claimRef is part of a bi-directional binding between + /// PersistentVolume and PersistentVolumeClaim. Expected to be non-nil + /// when bound. claim.VolumeName is the authoritative bind between PV + /// and PVC. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#binding + /// + [JsonProperty(PropertyName = "claimRef")] + public V1ObjectReference ClaimRef { get; set; } + + /// + /// Gets or sets FC represents a Fibre Channel resource that is + /// attached to a kubelet's host machine and then exposed to the pod. + /// + [JsonProperty(PropertyName = "fc")] + public V1FCVolumeSource Fc { get; set; } + + /// + /// Gets or sets flexVolume represents a generic volume resource that + /// is provisioned/attached using an exec based plugin. This is an + /// alpha feature and may change in future. + /// + [JsonProperty(PropertyName = "flexVolume")] + public V1FlexVolumeSource FlexVolume { get; set; } + + /// + /// Gets or sets flocker represents a Flocker volume attached to a + /// kubelet's host machine and exposed to the pod for its usage. This + /// depends on the Flocker control service being running + /// + [JsonProperty(PropertyName = "flocker")] + public V1FlockerVolumeSource Flocker { get; set; } + + /// + /// Gets or sets gCEPersistentDisk represents a GCE Disk resource that + /// is attached to a kubelet's host machine and then exposed to the + /// pod. Provisioned by an admin. More info: + /// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + /// + [JsonProperty(PropertyName = "gcePersistentDisk")] + public V1GCEPersistentDiskVolumeSource GcePersistentDisk { get; set; } + + /// + /// Gets or sets glusterfs represents a Glusterfs volume that is + /// attached to a host and exposed to the pod. Provisioned by an admin. + /// More info: + /// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md + /// + [JsonProperty(PropertyName = "glusterfs")] + public V1GlusterfsVolumeSource Glusterfs { get; set; } + + /// + /// Gets or sets hostPath represents a directory on the host. + /// Provisioned by a developer or tester. This is useful for + /// single-node development and testing only! On-host storage is not + /// supported in any way and WILL NOT WORK in a multi-node cluster. + /// More info: http://kubernetes.io/docs/user-guide/volumes#hostpath + /// + [JsonProperty(PropertyName = "hostPath")] + public V1HostPathVolumeSource HostPath { get; set; } + + /// + /// Gets or sets ISCSI represents an ISCSI Disk resource that is + /// attached to a kubelet's host machine and then exposed to the pod. + /// Provisioned by an admin. + /// + [JsonProperty(PropertyName = "iscsi")] + public V1ISCSIVolumeSource Iscsi { get; set; } + + /// + /// Gets or sets NFS represents an NFS mount on the host. Provisioned + /// by an admin. More info: + /// http://kubernetes.io/docs/user-guide/volumes#nfs + /// + [JsonProperty(PropertyName = "nfs")] + public V1NFSVolumeSource Nfs { get; set; } + + /// + /// Gets or sets what happens to a persistent volume when released from + /// its claim. Valid options are Retain (default) and Recycle. + /// Recycling must be supported by the volume plugin underlying this + /// persistent volume. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy + /// + [JsonProperty(PropertyName = "persistentVolumeReclaimPolicy")] + public string PersistentVolumeReclaimPolicy { get; set; } + + /// + /// Gets or sets photonPersistentDisk represents a PhotonController + /// persistent disk attached and mounted on kubelets host machine + /// + [JsonProperty(PropertyName = "photonPersistentDisk")] + public V1PhotonPersistentDiskVolumeSource PhotonPersistentDisk { get; set; } + + /// + /// Gets or sets portworxVolume represents a portworx volume attached + /// and mounted on kubelets host machine + /// + [JsonProperty(PropertyName = "portworxVolume")] + public V1PortworxVolumeSource PortworxVolume { get; set; } + + /// + /// Gets or sets quobyte represents a Quobyte mount on the host that + /// shares a pod's lifetime + /// + [JsonProperty(PropertyName = "quobyte")] + public V1QuobyteVolumeSource Quobyte { get; set; } + + /// + /// Gets or sets RBD represents a Rados Block Device mount on the host + /// that shares a pod's lifetime. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md + /// + [JsonProperty(PropertyName = "rbd")] + public V1RBDVolumeSource Rbd { get; set; } + + /// + /// Gets or sets scaleIO represents a ScaleIO persistent volume + /// attached and mounted on Kubernetes nodes. + /// + [JsonProperty(PropertyName = "scaleIO")] + public V1ScaleIOVolumeSource ScaleIO { get; set; } + + /// + /// Gets or sets name of StorageClass to which this persistent volume + /// belongs. Empty value means that this volume does not belong to any + /// StorageClass. + /// + [JsonProperty(PropertyName = "storageClassName")] + public string StorageClassName { get; set; } + + /// + /// Gets or sets vsphereVolume represents a vSphere volume attached and + /// mounted on kubelets host machine + /// + [JsonProperty(PropertyName = "vsphereVolume")] + public V1VsphereVirtualDiskVolumeSource VsphereVolume { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (AwsElasticBlockStore != null) + { + AwsElasticBlockStore.Validate(); + } + if (AzureDisk != null) + { + AzureDisk.Validate(); + } + if (AzureFile != null) + { + AzureFile.Validate(); + } + if (Cephfs != null) + { + Cephfs.Validate(); + } + if (Cinder != null) + { + Cinder.Validate(); + } + if (Fc != null) + { + Fc.Validate(); + } + if (FlexVolume != null) + { + FlexVolume.Validate(); + } + if (GcePersistentDisk != null) + { + GcePersistentDisk.Validate(); + } + if (Glusterfs != null) + { + Glusterfs.Validate(); + } + if (HostPath != null) + { + HostPath.Validate(); + } + if (Iscsi != null) + { + Iscsi.Validate(); + } + if (Nfs != null) + { + Nfs.Validate(); + } + if (PhotonPersistentDisk != null) + { + PhotonPersistentDisk.Validate(); + } + if (PortworxVolume != null) + { + PortworxVolume.Validate(); + } + if (Quobyte != null) + { + Quobyte.Validate(); + } + if (Rbd != null) + { + Rbd.Validate(); + } + if (ScaleIO != null) + { + ScaleIO.Validate(); + } + if (VsphereVolume != null) + { + VsphereVolume.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1PersistentVolumeStatus.cs b/src/generated/Models/V1PersistentVolumeStatus.cs new file mode 100755 index 000000000..98b8d4621 --- /dev/null +++ b/src/generated/Models/V1PersistentVolumeStatus.cs @@ -0,0 +1,71 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// PersistentVolumeStatus is the current status of a persistent volume. + /// + public partial class V1PersistentVolumeStatus + { + /// + /// Initializes a new instance of the V1PersistentVolumeStatus class. + /// + public V1PersistentVolumeStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PersistentVolumeStatus class. + /// + /// A human-readable message indicating details + /// about why the volume is in this state. + /// Phase indicates if a volume is available, bound + /// to a claim, or released by a claim. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#phase + /// Reason is a brief CamelCase string that + /// describes any failure and is meant for machine parsing and tidy + /// display in the CLI. + public V1PersistentVolumeStatus(string message = default(string), string phase = default(string), string reason = default(string)) + { + Message = message; + Phase = phase; + Reason = reason; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a human-readable message indicating details about why + /// the volume is in this state. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets phase indicates if a volume is available, bound to a + /// claim, or released by a claim. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#phase + /// + [JsonProperty(PropertyName = "phase")] + public string Phase { get; set; } + + /// + /// Gets or sets reason is a brief CamelCase string that describes any + /// failure and is meant for machine parsing and tidy display in the + /// CLI. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + } +} diff --git a/src/generated/Models/V1PhotonPersistentDiskVolumeSource.cs b/src/generated/Models/V1PhotonPersistentDiskVolumeSource.cs new file mode 100755 index 000000000..267e245f0 --- /dev/null +++ b/src/generated/Models/V1PhotonPersistentDiskVolumeSource.cs @@ -0,0 +1,74 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a Photon Controller persistent disk resource. + /// + public partial class V1PhotonPersistentDiskVolumeSource + { + /// + /// Initializes a new instance of the + /// V1PhotonPersistentDiskVolumeSource class. + /// + public V1PhotonPersistentDiskVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V1PhotonPersistentDiskVolumeSource class. + /// + /// ID that identifies Photon Controller persistent + /// disk + /// Filesystem type to mount. Must be a filesystem + /// type supported by the host operating system. Ex. "ext4", "xfs", + /// "ntfs". Implicitly inferred to be "ext4" if unspecified. + public V1PhotonPersistentDiskVolumeSource(string pdID, string fsType = default(string)) + { + FsType = fsType; + PdID = pdID; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets filesystem type to mount. Must be a filesystem type + /// supported by the host operating system. Ex. "ext4", "xfs", "ntfs". + /// Implicitly inferred to be "ext4" if unspecified. + /// + [JsonProperty(PropertyName = "fsType")] + public string FsType { get; set; } + + /// + /// Gets or sets ID that identifies Photon Controller persistent disk + /// + [JsonProperty(PropertyName = "pdID")] + public string PdID { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PdID == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PdID"); + } + } + } +} diff --git a/src/generated/Models/V1Pod.cs b/src/generated/Models/V1Pod.cs new file mode 100755 index 000000000..0e30947f0 --- /dev/null +++ b/src/generated/Models/V1Pod.cs @@ -0,0 +1,119 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Pod is a collection of containers that can run on a host. This resource + /// is created by clients and scheduled onto hosts. + /// + public partial class V1Pod + { + /// + /// Initializes a new instance of the V1Pod class. + /// + public V1Pod() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Pod class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Specification of the desired behavior of the + /// pod. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// Most recently observed status of the pod. This + /// data may not be up to date. Populated by the system. Read-only. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1Pod(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1PodSpec spec = default(V1PodSpec), V1PodStatus status = default(V1PodStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets specification of the desired behavior of the pod. More + /// info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1PodSpec Spec { get; set; } + + /// + /// Gets or sets most recently observed status of the pod. This data + /// may not be up to date. Populated by the system. Read-only. More + /// info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "status")] + public V1PodStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1PodAffinity.cs b/src/generated/Models/V1PodAffinity.cs new file mode 100755 index 000000000..709babdb3 --- /dev/null +++ b/src/generated/Models/V1PodAffinity.cs @@ -0,0 +1,111 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Pod affinity is a group of inter pod affinity scheduling rules. + /// + public partial class V1PodAffinity + { + /// + /// Initializes a new instance of the V1PodAffinity class. + /// + public V1PodAffinity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PodAffinity class. + /// + /// The + /// scheduler will prefer to schedule pods to nodes that satisfy the + /// affinity expressions specified by this field, but it may choose a + /// node that violates one or more of the expressions. The node that is + /// most preferred is the one with the greatest sum of weights, i.e. + /// for each node that meets all of the scheduling requirements + /// (resource request, requiredDuringScheduling affinity expressions, + /// etc.), compute a sum by iterating through the elements of this + /// field and adding "weight" to the sum if the node has pods which + /// matches the corresponding podAffinityTerm; the node(s) with the + /// highest sum are the most preferred. + /// NOT + /// YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If + /// the affinity requirements specified by this field are not met at + /// scheduling time, the pod will not be scheduled onto the node. If + /// the affinity requirements specified by this field cease to be met + /// at some point during pod execution (e.g. due to a pod label + /// update), the system will try to eventually evict the pod from its + /// node. When there are multiple elements, the lists of nodes + /// corresponding to each podAffinityTerm are intersected, i.e. all + /// terms must be satisfied. + /// RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm + /// `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` + /// If the affinity requirements specified by this field are not met at + /// scheduling time, the pod will not be scheduled onto the node. If + /// the affinity requirements specified by this field cease to be met + /// at some point during pod execution (e.g. due to a pod label + /// update), the system may or may not try to eventually evict the pod + /// from its node. When there are multiple elements, the lists of nodes + /// corresponding to each podAffinityTerm are intersected, i.e. all + /// terms must be satisfied. + public V1PodAffinity(IList preferredDuringSchedulingIgnoredDuringExecution = default(IList), IList requiredDuringSchedulingIgnoredDuringExecution = default(IList)) + { + PreferredDuringSchedulingIgnoredDuringExecution = preferredDuringSchedulingIgnoredDuringExecution; + RequiredDuringSchedulingIgnoredDuringExecution = requiredDuringSchedulingIgnoredDuringExecution; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the scheduler will prefer to schedule pods to nodes + /// that satisfy the affinity expressions specified by this field, but + /// it may choose a node that violates one or more of the expressions. + /// The node that is most preferred is the one with the greatest sum of + /// weights, i.e. for each node that meets all of the scheduling + /// requirements (resource request, requiredDuringScheduling affinity + /// expressions, etc.), compute a sum by iterating through the elements + /// of this field and adding "weight" to the sum if the node has pods + /// which matches the corresponding podAffinityTerm; the node(s) with + /// the highest sum are the most preferred. + /// + [JsonProperty(PropertyName = "preferredDuringSchedulingIgnoredDuringExecution")] + public IList PreferredDuringSchedulingIgnoredDuringExecution { get; set; } + + /// + /// Gets or sets NOT YET IMPLEMENTED. TODO: Uncomment field once it is + /// implemented. If the affinity requirements specified by this field + /// are not met at scheduling time, the pod will not be scheduled onto + /// the node. If the affinity requirements specified by this field + /// cease to be met at some point during pod execution (e.g. due to a + /// pod label update), the system will try to eventually evict the pod + /// from its node. When there are multiple elements, the lists of nodes + /// corresponding to each podAffinityTerm are intersected, i.e. all + /// terms must be satisfied. + /// RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm + /// `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` + /// If the affinity requirements specified by this field are not met at + /// scheduling time, the pod will not be scheduled onto the node. If + /// the affinity requirements specified by this field cease to be met + /// at some point during pod execution (e.g. due to a pod label + /// update), the system may or may not try to eventually evict the pod + /// from its node. When there are multiple elements, the lists of nodes + /// corresponding to each podAffinityTerm are intersected, i.e. all + /// terms must be satisfied. + /// + [JsonProperty(PropertyName = "requiredDuringSchedulingIgnoredDuringExecution")] + public IList RequiredDuringSchedulingIgnoredDuringExecution { get; set; } + + } +} diff --git a/src/generated/Models/V1PodAffinityTerm.cs b/src/generated/Models/V1PodAffinityTerm.cs new file mode 100755 index 000000000..d162305df --- /dev/null +++ b/src/generated/Models/V1PodAffinityTerm.cs @@ -0,0 +1,93 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Defines a set of pods (namely those matching the labelSelector relative + /// to the given namespace(s)) that this pod should be co-located + /// (affinity) or not co-located (anti-affinity) with, where co-located is + /// defined as running on a node whose value of the label with key + /// <topologyKey> tches that of any node on which a pod of the set of + /// pods is running + /// + public partial class V1PodAffinityTerm + { + /// + /// Initializes a new instance of the V1PodAffinityTerm class. + /// + public V1PodAffinityTerm() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PodAffinityTerm class. + /// + /// A label query over a set of resources, + /// in this case pods. + /// namespaces specifies which namespaces the + /// labelSelector applies to (matches against); null or empty list + /// means "this pod's namespace" + /// This pod should be co-located (affinity) + /// or not co-located (anti-affinity) with the pods matching the + /// labelSelector in the specified namespaces, where co-located is + /// defined as running on a node whose value of the label with key + /// topologyKey matches that of any node on which any of the selected + /// pods is running. For PreferredDuringScheduling pod anti-affinity, + /// empty topologyKey is interpreted as "all topologies" ("all + /// topologies" here means all the topologyKeys indicated by scheduler + /// command-line argument --failure-domains); for affinity and for + /// RequiredDuringScheduling pod anti-affinity, empty topologyKey is + /// not allowed. + public V1PodAffinityTerm(V1LabelSelector labelSelector = default(V1LabelSelector), IList namespaces = default(IList), string topologyKey = default(string)) + { + LabelSelector = labelSelector; + Namespaces = namespaces; + TopologyKey = topologyKey; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a label query over a set of resources, in this case + /// pods. + /// + [JsonProperty(PropertyName = "labelSelector")] + public V1LabelSelector LabelSelector { get; set; } + + /// + /// Gets or sets namespaces specifies which namespaces the + /// labelSelector applies to (matches against); null or empty list + /// means "this pod's namespace" + /// + [JsonProperty(PropertyName = "namespaces")] + public IList Namespaces { get; set; } + + /// + /// Gets or sets this pod should be co-located (affinity) or not + /// co-located (anti-affinity) with the pods matching the labelSelector + /// in the specified namespaces, where co-located is defined as running + /// on a node whose value of the label with key topologyKey matches + /// that of any node on which any of the selected pods is running. For + /// PreferredDuringScheduling pod anti-affinity, empty topologyKey is + /// interpreted as "all topologies" ("all topologies" here means all + /// the topologyKeys indicated by scheduler command-line argument + /// --failure-domains); for affinity and for RequiredDuringScheduling + /// pod anti-affinity, empty topologyKey is not allowed. + /// + [JsonProperty(PropertyName = "topologyKey")] + public string TopologyKey { get; set; } + + } +} diff --git a/src/generated/Models/V1PodAntiAffinity.cs b/src/generated/Models/V1PodAntiAffinity.cs new file mode 100755 index 000000000..a16c2de7d --- /dev/null +++ b/src/generated/Models/V1PodAntiAffinity.cs @@ -0,0 +1,114 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Pod anti affinity is a group of inter pod anti affinity scheduling + /// rules. + /// + public partial class V1PodAntiAffinity + { + /// + /// Initializes a new instance of the V1PodAntiAffinity class. + /// + public V1PodAntiAffinity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PodAntiAffinity class. + /// + /// The + /// scheduler will prefer to schedule pods to nodes that satisfy the + /// anti-affinity expressions specified by this field, but it may + /// choose a node that violates one or more of the expressions. The + /// node that is most preferred is the one with the greatest sum of + /// weights, i.e. for each node that meets all of the scheduling + /// requirements (resource request, requiredDuringScheduling + /// anti-affinity expressions, etc.), compute a sum by iterating + /// through the elements of this field and adding "weight" to the sum + /// if the node has pods which matches the corresponding + /// podAffinityTerm; the node(s) with the highest sum are the most + /// preferred. + /// NOT + /// YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If + /// the anti-affinity requirements specified by this field are not met + /// at scheduling time, the pod will not be scheduled onto the node. If + /// the anti-affinity requirements specified by this field cease to be + /// met at some point during pod execution (e.g. due to a pod label + /// update), the system will try to eventually evict the pod from its + /// node. When there are multiple elements, the lists of nodes + /// corresponding to each podAffinityTerm are intersected, i.e. all + /// terms must be satisfied. + /// RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm + /// `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` + /// If the anti-affinity requirements specified by this field are not + /// met at scheduling time, the pod will not be scheduled onto the + /// node. If the anti-affinity requirements specified by this field + /// cease to be met at some point during pod execution (e.g. due to a + /// pod label update), the system may or may not try to eventually + /// evict the pod from its node. When there are multiple elements, the + /// lists of nodes corresponding to each podAffinityTerm are + /// intersected, i.e. all terms must be satisfied. + public V1PodAntiAffinity(IList preferredDuringSchedulingIgnoredDuringExecution = default(IList), IList requiredDuringSchedulingIgnoredDuringExecution = default(IList)) + { + PreferredDuringSchedulingIgnoredDuringExecution = preferredDuringSchedulingIgnoredDuringExecution; + RequiredDuringSchedulingIgnoredDuringExecution = requiredDuringSchedulingIgnoredDuringExecution; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the scheduler will prefer to schedule pods to nodes + /// that satisfy the anti-affinity expressions specified by this field, + /// but it may choose a node that violates one or more of the + /// expressions. The node that is most preferred is the one with the + /// greatest sum of weights, i.e. for each node that meets all of the + /// scheduling requirements (resource request, requiredDuringScheduling + /// anti-affinity expressions, etc.), compute a sum by iterating + /// through the elements of this field and adding "weight" to the sum + /// if the node has pods which matches the corresponding + /// podAffinityTerm; the node(s) with the highest sum are the most + /// preferred. + /// + [JsonProperty(PropertyName = "preferredDuringSchedulingIgnoredDuringExecution")] + public IList PreferredDuringSchedulingIgnoredDuringExecution { get; set; } + + /// + /// Gets or sets NOT YET IMPLEMENTED. TODO: Uncomment field once it is + /// implemented. If the anti-affinity requirements specified by this + /// field are not met at scheduling time, the pod will not be scheduled + /// onto the node. If the anti-affinity requirements specified by this + /// field cease to be met at some point during pod execution (e.g. due + /// to a pod label update), the system will try to eventually evict the + /// pod from its node. When there are multiple elements, the lists of + /// nodes corresponding to each podAffinityTerm are intersected, i.e. + /// all terms must be satisfied. + /// RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm + /// `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` + /// If the anti-affinity requirements specified by this field are not + /// met at scheduling time, the pod will not be scheduled onto the + /// node. If the anti-affinity requirements specified by this field + /// cease to be met at some point during pod execution (e.g. due to a + /// pod label update), the system may or may not try to eventually + /// evict the pod from its node. When there are multiple elements, the + /// lists of nodes corresponding to each podAffinityTerm are + /// intersected, i.e. all terms must be satisfied. + /// + [JsonProperty(PropertyName = "requiredDuringSchedulingIgnoredDuringExecution")] + public IList RequiredDuringSchedulingIgnoredDuringExecution { get; set; } + + } +} diff --git a/src/generated/Models/V1PodCondition.cs b/src/generated/Models/V1PodCondition.cs new file mode 100755 index 000000000..3594a09f6 --- /dev/null +++ b/src/generated/Models/V1PodCondition.cs @@ -0,0 +1,118 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// PodCondition contains details for the current condition of this pod. + /// + public partial class V1PodCondition + { + /// + /// Initializes a new instance of the V1PodCondition class. + /// + public V1PodCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PodCondition class. + /// + /// Status is the status of the condition. Can be + /// True, False, Unknown. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#pod-conditions + /// Type is the type of the condition. Currently + /// only Ready. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#pod-conditions + /// Last time we probed the + /// condition. + /// Last time the condition + /// transitioned from one status to another. + /// Human-readable message indicating details + /// about last transition. + /// Unique, one-word, CamelCase reason for the + /// condition's last transition. + public V1PodCondition(string status, string type, System.DateTime? lastProbeTime = default(System.DateTime?), System.DateTime? lastTransitionTime = default(System.DateTime?), string message = default(string), string reason = default(string)) + { + LastProbeTime = lastProbeTime; + LastTransitionTime = lastTransitionTime; + Message = message; + Reason = reason; + Status = status; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets last time we probed the condition. + /// + [JsonProperty(PropertyName = "lastProbeTime")] + public System.DateTime? LastProbeTime { get; set; } + + /// + /// Gets or sets last time the condition transitioned from one status + /// to another. + /// + [JsonProperty(PropertyName = "lastTransitionTime")] + public System.DateTime? LastTransitionTime { get; set; } + + /// + /// Gets or sets human-readable message indicating details about last + /// transition. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets unique, one-word, CamelCase reason for the condition's + /// last transition. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets status is the status of the condition. Can be True, + /// False, Unknown. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#pod-conditions + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets type is the type of the condition. Currently only + /// Ready. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#pod-conditions + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Status"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/src/generated/Models/V1PodList.cs b/src/generated/Models/V1PodList.cs new file mode 100755 index 000000000..c4ad4008e --- /dev/null +++ b/src/generated/Models/V1PodList.cs @@ -0,0 +1,115 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PodList is a list of Pods. + /// + public partial class V1PodList + { + /// + /// Initializes a new instance of the V1PodList class. + /// + public V1PodList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PodList class. + /// + /// List of pods. More info: + /// http://kubernetes.io/docs/user-guide/pods + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1PodList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of pods. More info: + /// http://kubernetes.io/docs/user-guide/pods + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1PodSecurityContext.cs b/src/generated/Models/V1PodSecurityContext.cs new file mode 100755 index 000000000..2b87cd5b4 --- /dev/null +++ b/src/generated/Models/V1PodSecurityContext.cs @@ -0,0 +1,135 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PodSecurityContext holds pod-level security attributes and common + /// container settings. Some fields are also present in + /// container.securityContext. Field values of container.securityContext + /// take precedence over field values of PodSecurityContext. + /// + public partial class V1PodSecurityContext + { + /// + /// Initializes a new instance of the V1PodSecurityContext class. + /// + public V1PodSecurityContext() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PodSecurityContext class. + /// + /// A special supplemental group that applies to + /// all containers in a pod. Some volume types allow the Kubelet to + /// change the ownership of that volume to be owned by the pod: + /// + /// 1. The owning GID will be the FSGroup 2. The setgid bit is set (new + /// files created in the volume will be owned by FSGroup) 3. The + /// permission bits are OR'd with rw-rw---- + /// + /// If unset, the Kubelet will not modify the ownership and permissions + /// of any volume. + /// Indicates that the container must run as + /// a non-root user. If true, the Kubelet will validate the image at + /// runtime to ensure that it does not run as UID 0 (root) and fail to + /// start the container if it does. If unset or false, no such + /// validation will be performed. May also be set in SecurityContext. + /// If set in both SecurityContext and PodSecurityContext, the value + /// specified in SecurityContext takes precedence. + /// The UID to run the entrypoint of the + /// container process. Defaults to user specified in image metadata if + /// unspecified. May also be set in SecurityContext. If set in both + /// SecurityContext and PodSecurityContext, the value specified in + /// SecurityContext takes precedence for that container. + /// The SELinux context to be applied to + /// all containers. If unspecified, the container runtime will allocate + /// a random SELinux context for each container. May also be set in + /// SecurityContext. If set in both SecurityContext and + /// PodSecurityContext, the value specified in SecurityContext takes + /// precedence for that container. + /// A list of groups applied to the + /// first process run in each container, in addition to the container's + /// primary GID. If unspecified, no groups will be added to any + /// container. + public V1PodSecurityContext(long? fsGroup = default(long?), bool? runAsNonRoot = default(bool?), long? runAsUser = default(long?), V1SELinuxOptions seLinuxOptions = default(V1SELinuxOptions), IList supplementalGroups = default(IList)) + { + FsGroup = fsGroup; + RunAsNonRoot = runAsNonRoot; + RunAsUser = runAsUser; + SeLinuxOptions = seLinuxOptions; + SupplementalGroups = supplementalGroups; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a special supplemental group that applies to all + /// containers in a pod. Some volume types allow the Kubelet to change + /// the ownership of that volume to be owned by the pod: + /// + /// 1. The owning GID will be the FSGroup 2. The setgid bit is set (new + /// files created in the volume will be owned by FSGroup) 3. The + /// permission bits are OR'd with rw-rw---- + /// + /// If unset, the Kubelet will not modify the ownership and permissions + /// of any volume. + /// + [JsonProperty(PropertyName = "fsGroup")] + public long? FsGroup { get; set; } + + /// + /// Gets or sets indicates that the container must run as a non-root + /// user. If true, the Kubelet will validate the image at runtime to + /// ensure that it does not run as UID 0 (root) and fail to start the + /// container if it does. If unset or false, no such validation will be + /// performed. May also be set in SecurityContext. If set in both + /// SecurityContext and PodSecurityContext, the value specified in + /// SecurityContext takes precedence. + /// + [JsonProperty(PropertyName = "runAsNonRoot")] + public bool? RunAsNonRoot { get; set; } + + /// + /// Gets or sets the UID to run the entrypoint of the container + /// process. Defaults to user specified in image metadata if + /// unspecified. May also be set in SecurityContext. If set in both + /// SecurityContext and PodSecurityContext, the value specified in + /// SecurityContext takes precedence for that container. + /// + [JsonProperty(PropertyName = "runAsUser")] + public long? RunAsUser { get; set; } + + /// + /// Gets or sets the SELinux context to be applied to all containers. + /// If unspecified, the container runtime will allocate a random + /// SELinux context for each container. May also be set in + /// SecurityContext. If set in both SecurityContext and + /// PodSecurityContext, the value specified in SecurityContext takes + /// precedence for that container. + /// + [JsonProperty(PropertyName = "seLinuxOptions")] + public V1SELinuxOptions SeLinuxOptions { get; set; } + + /// + /// Gets or sets a list of groups applied to the first process run in + /// each container, in addition to the container's primary GID. If + /// unspecified, no groups will be added to any container. + /// + [JsonProperty(PropertyName = "supplementalGroups")] + public IList SupplementalGroups { get; set; } + + } +} diff --git a/src/generated/Models/V1PodSpec.cs b/src/generated/Models/V1PodSpec.cs new file mode 100755 index 000000000..7de37816d --- /dev/null +++ b/src/generated/Models/V1PodSpec.cs @@ -0,0 +1,395 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PodSpec is a description of a pod. + /// + public partial class V1PodSpec + { + /// + /// Initializes a new instance of the V1PodSpec class. + /// + public V1PodSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PodSpec class. + /// + /// List of containers belonging to the pod. + /// Containers cannot currently be added or removed. There must be at + /// least one container in a Pod. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/containers + /// Optional duration in seconds + /// the pod may be active on the node relative to StartTime before the + /// system will actively try to mark it failed and kill associated + /// containers. Value must be a positive integer. + /// If specified, the pod's scheduling + /// constraints + /// AutomountServiceAccountToken + /// indicates whether a service account token should be automatically + /// mounted. + /// Set DNS policy for containers within the + /// pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. + /// Defaults to "ClusterFirst". To have DNS options set along with + /// hostNetwork, you have to specify DNS policy explicitly to + /// 'ClusterFirstWithHostNet'. + /// Use the host's ipc namespace. Optional: + /// Default to false. + /// Host networking requested for this pod. + /// Use the host's network namespace. If this option is set, the ports + /// that will be used must be specified. Default to false. + /// Use the host's pid namespace. Optional: + /// Default to false. + /// Specifies the hostname of the Pod If not + /// specified, the pod's hostname will be set to a system-defined + /// value. + /// ImagePullSecrets is an optional list + /// of references to secrets in the same namespace to use for pulling + /// any of the images used by this PodSpec. If specified, these secrets + /// will be passed to individual puller implementations for them to + /// use. For example, in the case of docker, only DockerConfig type + /// secrets are honored. More info: + /// http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod + /// List of initialization containers + /// belonging to the pod. Init containers are executed in order prior + /// to containers being started. If any init container fails, the pod + /// is considered to have failed and is handled according to its + /// restartPolicy. The name for an init container or normal container + /// must be unique among all containers. Init containers may not have + /// Lifecycle actions, Readiness probes, or Liveness probes. The + /// resourceRequirements of an init container are taken into account + /// during scheduling by finding the highest request/limit for each + /// resource type, and then using the max of of that value or the sum + /// of the normal containers. Limits are applied to init containers in + /// a similar fashion. Init containers cannot currently be added or + /// removed. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/containers + /// NodeName is a request to schedule this pod + /// onto a specific node. If it is non-empty, the scheduler simply + /// schedules this pod onto that node, assuming that it fits resource + /// requirements. + /// NodeSelector is a selector which must be + /// true for the pod to fit on a node. Selector which must match a + /// node's labels for the pod to be scheduled on that node. More info: + /// http://kubernetes.io/docs/user-guide/node-selection/README + /// Restart policy for all containers + /// within the pod. One of Always, OnFailure, Never. Default to Always. + /// More info: + /// http://kubernetes.io/docs/user-guide/pod-states#restartpolicy + /// If specified, the pod will be + /// dispatched by specified scheduler. If not specified, the pod will + /// be dispatched by default scheduler. + /// SecurityContext holds pod-level + /// security attributes and common container settings. Optional: + /// Defaults to empty. See type description for default values of each + /// field. + /// DeprecatedServiceAccount is a + /// depreciated alias for ServiceAccountName. Deprecated: Use + /// serviceAccountName instead. + /// ServiceAccountName is the name of + /// the ServiceAccount to use to run this pod. More info: + /// http://releases.k8s.io/HEAD/docs/design/service_accounts.md + /// If specified, the fully qualified Pod + /// hostname will be "<hostname>.<subdomain>.<pod + /// namespace>.svc.<cluster domain>". If not specified, the + /// pod will not have a domainname at all. + /// Optional duration in + /// seconds the pod needs to terminate gracefully. May be decreased in + /// delete request. Value must be non-negative integer. The value zero + /// indicates delete immediately. If this value is nil, the default + /// grace period will be used instead. The grace period is the duration + /// in seconds after the processes running in the pod are sent a + /// termination signal and the time when the processes are forcibly + /// halted with a kill signal. Set this value longer than the expected + /// cleanup time for your process. Defaults to 30 seconds. + /// If specified, the pod's + /// tolerations. + /// List of volumes that can be mounted by + /// containers belonging to the pod. More info: + /// http://kubernetes.io/docs/user-guide/volumes + public V1PodSpec(IList containers, long? activeDeadlineSeconds = default(long?), V1Affinity affinity = default(V1Affinity), bool? automountServiceAccountToken = default(bool?), string dnsPolicy = default(string), bool? hostIPC = default(bool?), bool? hostNetwork = default(bool?), bool? hostPID = default(bool?), string hostname = default(string), IList imagePullSecrets = default(IList), IList initContainers = default(IList), string nodeName = default(string), IDictionary nodeSelector = default(IDictionary), string restartPolicy = default(string), string schedulerName = default(string), V1PodSecurityContext securityContext = default(V1PodSecurityContext), string serviceAccount = default(string), string serviceAccountName = default(string), string subdomain = default(string), long? terminationGracePeriodSeconds = default(long?), IList tolerations = default(IList), IList volumes = default(IList)) + { + ActiveDeadlineSeconds = activeDeadlineSeconds; + Affinity = affinity; + AutomountServiceAccountToken = automountServiceAccountToken; + Containers = containers; + DnsPolicy = dnsPolicy; + HostIPC = hostIPC; + HostNetwork = hostNetwork; + HostPID = hostPID; + Hostname = hostname; + ImagePullSecrets = imagePullSecrets; + InitContainers = initContainers; + NodeName = nodeName; + NodeSelector = nodeSelector; + RestartPolicy = restartPolicy; + SchedulerName = schedulerName; + SecurityContext = securityContext; + ServiceAccount = serviceAccount; + ServiceAccountName = serviceAccountName; + Subdomain = subdomain; + TerminationGracePeriodSeconds = terminationGracePeriodSeconds; + Tolerations = tolerations; + Volumes = volumes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets optional duration in seconds the pod may be active on + /// the node relative to StartTime before the system will actively try + /// to mark it failed and kill associated containers. Value must be a + /// positive integer. + /// + [JsonProperty(PropertyName = "activeDeadlineSeconds")] + public long? ActiveDeadlineSeconds { get; set; } + + /// + /// Gets or sets if specified, the pod's scheduling constraints + /// + [JsonProperty(PropertyName = "affinity")] + public V1Affinity Affinity { get; set; } + + /// + /// Gets or sets automountServiceAccountToken indicates whether a + /// service account token should be automatically mounted. + /// + [JsonProperty(PropertyName = "automountServiceAccountToken")] + public bool? AutomountServiceAccountToken { get; set; } + + /// + /// Gets or sets list of containers belonging to the pod. Containers + /// cannot currently be added or removed. There must be at least one + /// container in a Pod. Cannot be updated. More info: + /// http://kubernetes.io/docs/user-guide/containers + /// + [JsonProperty(PropertyName = "containers")] + public IList Containers { get; set; } + + /// + /// Gets or sets set DNS policy for containers within the pod. One of + /// 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to + /// "ClusterFirst". To have DNS options set along with hostNetwork, you + /// have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. + /// + [JsonProperty(PropertyName = "dnsPolicy")] + public string DnsPolicy { get; set; } + + /// + /// Gets or sets use the host's ipc namespace. Optional: Default to + /// false. + /// + [JsonProperty(PropertyName = "hostIPC")] + public bool? HostIPC { get; set; } + + /// + /// Gets or sets host networking requested for this pod. Use the host's + /// network namespace. If this option is set, the ports that will be + /// used must be specified. Default to false. + /// + [JsonProperty(PropertyName = "hostNetwork")] + public bool? HostNetwork { get; set; } + + /// + /// Gets or sets use the host's pid namespace. Optional: Default to + /// false. + /// + [JsonProperty(PropertyName = "hostPID")] + public bool? HostPID { get; set; } + + /// + /// Gets or sets specifies the hostname of the Pod If not specified, + /// the pod's hostname will be set to a system-defined value. + /// + [JsonProperty(PropertyName = "hostname")] + public string Hostname { get; set; } + + /// + /// Gets or sets imagePullSecrets is an optional list of references to + /// secrets in the same namespace to use for pulling any of the images + /// used by this PodSpec. If specified, these secrets will be passed to + /// individual puller implementations for them to use. For example, in + /// the case of docker, only DockerConfig type secrets are honored. + /// More info: + /// http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod + /// + [JsonProperty(PropertyName = "imagePullSecrets")] + public IList ImagePullSecrets { get; set; } + + /// + /// Gets or sets list of initialization containers belonging to the + /// pod. Init containers are executed in order prior to containers + /// being started. If any init container fails, the pod is considered + /// to have failed and is handled according to its restartPolicy. The + /// name for an init container or normal container must be unique among + /// all containers. Init containers may not have Lifecycle actions, + /// Readiness probes, or Liveness probes. The resourceRequirements of + /// an init container are taken into account during scheduling by + /// finding the highest request/limit for each resource type, and then + /// using the max of of that value or the sum of the normal containers. + /// Limits are applied to init containers in a similar fashion. Init + /// containers cannot currently be added or removed. Cannot be updated. + /// More info: http://kubernetes.io/docs/user-guide/containers + /// + [JsonProperty(PropertyName = "initContainers")] + public IList InitContainers { get; set; } + + /// + /// Gets or sets nodeName is a request to schedule this pod onto a + /// specific node. If it is non-empty, the scheduler simply schedules + /// this pod onto that node, assuming that it fits resource + /// requirements. + /// + [JsonProperty(PropertyName = "nodeName")] + public string NodeName { get; set; } + + /// + /// Gets or sets nodeSelector is a selector which must be true for the + /// pod to fit on a node. Selector which must match a node's labels for + /// the pod to be scheduled on that node. More info: + /// http://kubernetes.io/docs/user-guide/node-selection/README + /// + [JsonProperty(PropertyName = "nodeSelector")] + public IDictionary NodeSelector { get; set; } + + /// + /// Gets or sets restart policy for all containers within the pod. One + /// of Always, OnFailure, Never. Default to Always. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#restartpolicy + /// + [JsonProperty(PropertyName = "restartPolicy")] + public string RestartPolicy { get; set; } + + /// + /// Gets or sets if specified, the pod will be dispatched by specified + /// scheduler. If not specified, the pod will be dispatched by default + /// scheduler. + /// + [JsonProperty(PropertyName = "schedulerName")] + public string SchedulerName { get; set; } + + /// + /// Gets or sets securityContext holds pod-level security attributes + /// and common container settings. Optional: Defaults to empty. See + /// type description for default values of each field. + /// + [JsonProperty(PropertyName = "securityContext")] + public V1PodSecurityContext SecurityContext { get; set; } + + /// + /// Gets or sets deprecatedServiceAccount is a depreciated alias for + /// ServiceAccountName. Deprecated: Use serviceAccountName instead. + /// + [JsonProperty(PropertyName = "serviceAccount")] + public string ServiceAccount { get; set; } + + /// + /// Gets or sets serviceAccountName is the name of the ServiceAccount + /// to use to run this pod. More info: + /// http://releases.k8s.io/HEAD/docs/design/service_accounts.md + /// + [JsonProperty(PropertyName = "serviceAccountName")] + public string ServiceAccountName { get; set; } + + /// + /// Gets or sets if specified, the fully qualified Pod hostname will be + /// "&lt;hostname&gt;.&lt;subdomain&gt;.&lt;pod + /// namespace&gt;.svc.&lt;cluster domain&gt;". If not + /// specified, the pod will not have a domainname at all. + /// + [JsonProperty(PropertyName = "subdomain")] + public string Subdomain { get; set; } + + /// + /// Gets or sets optional duration in seconds the pod needs to + /// terminate gracefully. May be decreased in delete request. Value + /// must be non-negative integer. The value zero indicates delete + /// immediately. If this value is nil, the default grace period will be + /// used instead. The grace period is the duration in seconds after the + /// processes running in the pod are sent a termination signal and the + /// time when the processes are forcibly halted with a kill signal. Set + /// this value longer than the expected cleanup time for your process. + /// Defaults to 30 seconds. + /// + [JsonProperty(PropertyName = "terminationGracePeriodSeconds")] + public long? TerminationGracePeriodSeconds { get; set; } + + /// + /// Gets or sets if specified, the pod's tolerations. + /// + [JsonProperty(PropertyName = "tolerations")] + public IList Tolerations { get; set; } + + /// + /// Gets or sets list of volumes that can be mounted by containers + /// belonging to the pod. More info: + /// http://kubernetes.io/docs/user-guide/volumes + /// + [JsonProperty(PropertyName = "volumes")] + public IList Volumes { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Containers == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Containers"); + } + if (Affinity != null) + { + Affinity.Validate(); + } + if (Containers != null) + { + foreach (var element in Containers) + { + if (element != null) + { + element.Validate(); + } + } + } + if (InitContainers != null) + { + foreach (var element1 in InitContainers) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (Volumes != null) + { + foreach (var element2 in Volumes) + { + if (element2 != null) + { + element2.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1PodStatus.cs b/src/generated/Models/V1PodStatus.cs new file mode 100755 index 000000000..f57134e45 --- /dev/null +++ b/src/generated/Models/V1PodStatus.cs @@ -0,0 +1,155 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PodStatus represents information about the status of a pod. Status may + /// trail the actual state of a system. + /// + public partial class V1PodStatus + { + /// + /// Initializes a new instance of the V1PodStatus class. + /// + public V1PodStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PodStatus class. + /// + /// Current service state of pod. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#pod-conditions + /// The list has one entry per + /// container in the manifest. Each entry is currently the output of + /// `docker inspect`. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#container-statuses + /// IP address of the host to which the pod is + /// assigned. Empty if not yet scheduled. + /// The list has one entry per init + /// container in the manifest. The most recent successful init + /// container will have ready = true, the most recently started + /// container will have startTime set. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#container-statuses + /// A human readable message indicating details + /// about why the pod is in this condition. + /// Current condition of the pod. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#pod-phase + /// IP address allocated to the pod. Routable at + /// least within the cluster. Empty if not yet allocated. + /// The Quality of Service (QOS) classification + /// assigned to the pod based on resource requirements See PodQOSClass + /// type for available QOS classes More info: + /// https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md + /// A brief CamelCase message indicating details + /// about why the pod is in this state. e.g. 'OutOfDisk' + /// RFC 3339 date and time at which the object + /// was acknowledged by the Kubelet. This is before the Kubelet pulled + /// the container image(s) for the pod. + public V1PodStatus(IList conditions = default(IList), IList containerStatuses = default(IList), string hostIP = default(string), IList initContainerStatuses = default(IList), string message = default(string), string phase = default(string), string podIP = default(string), string qosClass = default(string), string reason = default(string), System.DateTime? startTime = default(System.DateTime?)) + { + Conditions = conditions; + ContainerStatuses = containerStatuses; + HostIP = hostIP; + InitContainerStatuses = initContainerStatuses; + Message = message; + Phase = phase; + PodIP = podIP; + QosClass = qosClass; + Reason = reason; + StartTime = startTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current service state of pod. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#pod-conditions + /// + [JsonProperty(PropertyName = "conditions")] + public IList Conditions { get; set; } + + /// + /// Gets or sets the list has one entry per container in the manifest. + /// Each entry is currently the output of `docker inspect`. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#container-statuses + /// + [JsonProperty(PropertyName = "containerStatuses")] + public IList ContainerStatuses { get; set; } + + /// + /// Gets or sets IP address of the host to which the pod is assigned. + /// Empty if not yet scheduled. + /// + [JsonProperty(PropertyName = "hostIP")] + public string HostIP { get; set; } + + /// + /// Gets or sets the list has one entry per init container in the + /// manifest. The most recent successful init container will have ready + /// = true, the most recently started container will have startTime + /// set. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#container-statuses + /// + [JsonProperty(PropertyName = "initContainerStatuses")] + public IList InitContainerStatuses { get; set; } + + /// + /// Gets or sets a human readable message indicating details about why + /// the pod is in this condition. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets current condition of the pod. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#pod-phase + /// + [JsonProperty(PropertyName = "phase")] + public string Phase { get; set; } + + /// + /// Gets or sets IP address allocated to the pod. Routable at least + /// within the cluster. Empty if not yet allocated. + /// + [JsonProperty(PropertyName = "podIP")] + public string PodIP { get; set; } + + /// + /// Gets or sets the Quality of Service (QOS) classification assigned + /// to the pod based on resource requirements See PodQOSClass type for + /// available QOS classes More info: + /// https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md + /// + [JsonProperty(PropertyName = "qosClass")] + public string QosClass { get; set; } + + /// + /// Gets or sets a brief CamelCase message indicating details about why + /// the pod is in this state. e.g. 'OutOfDisk' + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets RFC 3339 date and time at which the object was + /// acknowledged by the Kubelet. This is before the Kubelet pulled the + /// container image(s) for the pod. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; set; } + + } +} diff --git a/src/generated/Models/V1PodTemplate.cs b/src/generated/Models/V1PodTemplate.cs new file mode 100755 index 000000000..0b15eca0b --- /dev/null +++ b/src/generated/Models/V1PodTemplate.cs @@ -0,0 +1,105 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// PodTemplate describes a template for creating copies of a predefined + /// pod. + /// + public partial class V1PodTemplate + { + /// + /// Initializes a new instance of the V1PodTemplate class. + /// + public V1PodTemplate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PodTemplate class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Template defines the pods that will be + /// created from this pod template. + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1PodTemplate(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1PodTemplateSpec template = default(V1PodTemplateSpec)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Template = template; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets template defines the pods that will be created from + /// this pod template. + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "template")] + public V1PodTemplateSpec Template { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Template != null) + { + Template.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1PodTemplateList.cs b/src/generated/Models/V1PodTemplateList.cs new file mode 100755 index 000000000..132fabf4c --- /dev/null +++ b/src/generated/Models/V1PodTemplateList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PodTemplateList is a list of PodTemplates. + /// + public partial class V1PodTemplateList + { + /// + /// Initializes a new instance of the V1PodTemplateList class. + /// + public V1PodTemplateList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PodTemplateList class. + /// + /// List of pod templates + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1PodTemplateList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of pod templates + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1PodTemplateSpec.cs b/src/generated/Models/V1PodTemplateSpec.cs new file mode 100755 index 000000000..e6695c1a5 --- /dev/null +++ b/src/generated/Models/V1PodTemplateSpec.cs @@ -0,0 +1,73 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// PodTemplateSpec describes the data a pod should have when created from + /// a template + /// + public partial class V1PodTemplateSpec + { + /// + /// Initializes a new instance of the V1PodTemplateSpec class. + /// + public V1PodTemplateSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PodTemplateSpec class. + /// + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Specification of the desired behavior of the + /// pod. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1PodTemplateSpec(V1ObjectMeta metadata = default(V1ObjectMeta), V1PodSpec spec = default(V1PodSpec)) + { + Metadata = metadata; + Spec = spec; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets specification of the desired behavior of the pod. More + /// info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1PodSpec Spec { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1PortworxVolumeSource.cs b/src/generated/Models/V1PortworxVolumeSource.cs new file mode 100755 index 000000000..4b7915062 --- /dev/null +++ b/src/generated/Models/V1PortworxVolumeSource.cs @@ -0,0 +1,84 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// PortworxVolumeSource represents a Portworx volume resource. + /// + public partial class V1PortworxVolumeSource + { + /// + /// Initializes a new instance of the V1PortworxVolumeSource class. + /// + public V1PortworxVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PortworxVolumeSource class. + /// + /// VolumeID uniquely identifies a Portworx + /// volume + /// FSType represents the filesystem type to mount + /// Must be a filesystem type supported by the host operating system. + /// Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if + /// unspecified. + /// Defaults to false (read/write). + /// ReadOnly here will force the ReadOnly setting in + /// VolumeMounts. + public V1PortworxVolumeSource(string volumeID, string fsType = default(string), bool? readOnlyProperty = default(bool?)) + { + FsType = fsType; + ReadOnlyProperty = readOnlyProperty; + VolumeID = volumeID; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets fSType represents the filesystem type to mount Must be + /// a filesystem type supported by the host operating system. Ex. + /// "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + /// + [JsonProperty(PropertyName = "fsType")] + public string FsType { get; set; } + + /// + /// Gets or sets defaults to false (read/write). ReadOnly here will + /// force the ReadOnly setting in VolumeMounts. + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets volumeID uniquely identifies a Portworx volume + /// + [JsonProperty(PropertyName = "volumeID")] + public string VolumeID { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (VolumeID == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "VolumeID"); + } + } + } +} diff --git a/src/generated/Models/V1Preconditions.cs b/src/generated/Models/V1Preconditions.cs new file mode 100755 index 000000000..c616e38e8 --- /dev/null +++ b/src/generated/Models/V1Preconditions.cs @@ -0,0 +1,46 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Preconditions must be fulfilled before an operation (update, delete, + /// etc.) is carried out. + /// + public partial class V1Preconditions + { + /// + /// Initializes a new instance of the V1Preconditions class. + /// + public V1Preconditions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Preconditions class. + /// + /// Specifies the target UID. + public V1Preconditions(string uid = default(string)) + { + Uid = uid; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the target UID. + /// + [JsonProperty(PropertyName = "uid")] + public string Uid { get; set; } + + } +} diff --git a/src/generated/Models/V1PreferredSchedulingTerm.cs b/src/generated/Models/V1PreferredSchedulingTerm.cs new file mode 100755 index 000000000..37e1efb58 --- /dev/null +++ b/src/generated/Models/V1PreferredSchedulingTerm.cs @@ -0,0 +1,77 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// An empty preferred scheduling term matches all objects with implicit + /// weight 0 (i.e. it's a no-op). A null preferred scheduling term matches + /// no objects (i.e. is also a no-op). + /// + public partial class V1PreferredSchedulingTerm + { + /// + /// Initializes a new instance of the V1PreferredSchedulingTerm class. + /// + public V1PreferredSchedulingTerm() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1PreferredSchedulingTerm class. + /// + /// A node selector term, associated with the + /// corresponding weight. + /// Weight associated with matching the + /// corresponding nodeSelectorTerm, in the range 1-100. + public V1PreferredSchedulingTerm(V1NodeSelectorTerm preference, int weight) + { + Preference = preference; + Weight = weight; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a node selector term, associated with the + /// corresponding weight. + /// + [JsonProperty(PropertyName = "preference")] + public V1NodeSelectorTerm Preference { get; set; } + + /// + /// Gets or sets weight associated with matching the corresponding + /// nodeSelectorTerm, in the range 1-100. + /// + [JsonProperty(PropertyName = "weight")] + public int Weight { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Preference == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Preference"); + } + if (Preference != null) + { + Preference.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1Probe.cs b/src/generated/Models/V1Probe.cs new file mode 100755 index 000000000..ca7950235 --- /dev/null +++ b/src/generated/Models/V1Probe.cs @@ -0,0 +1,144 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Probe describes a health check to be performed against a container to + /// determine whether it is alive or ready to receive traffic. + /// + public partial class V1Probe + { + /// + /// Initializes a new instance of the V1Probe class. + /// + public V1Probe() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Probe class. + /// + /// One and only one of the following should be + /// specified. Exec specifies the action to take. + /// Minimum consecutive failures for the + /// probe to be considered failed after having succeeded. Defaults to + /// 3. Minimum value is 1. + /// HTTPGet specifies the http request to + /// perform. + /// Number of seconds after the + /// container has started before liveness probes are initiated. More + /// info: + /// http://kubernetes.io/docs/user-guide/pod-states#container-probes + /// How often (in seconds) to perform the + /// probe. Default to 10 seconds. Minimum value is 1. + /// Minimum consecutive successes for + /// the probe to be considered successful after having failed. Defaults + /// to 1. Must be 1 for liveness. Minimum value is 1. + /// TCPSocket specifies an action involving a + /// TCP port. TCP hooks not yet supported + /// Number of seconds after which the + /// probe times out. Defaults to 1 second. Minimum value is 1. More + /// info: + /// http://kubernetes.io/docs/user-guide/pod-states#container-probes + public V1Probe(V1ExecAction exec = default(V1ExecAction), int? failureThreshold = default(int?), V1HTTPGetAction httpGet = default(V1HTTPGetAction), int? initialDelaySeconds = default(int?), int? periodSeconds = default(int?), int? successThreshold = default(int?), V1TCPSocketAction tcpSocket = default(V1TCPSocketAction), int? timeoutSeconds = default(int?)) + { + Exec = exec; + FailureThreshold = failureThreshold; + HttpGet = httpGet; + InitialDelaySeconds = initialDelaySeconds; + PeriodSeconds = periodSeconds; + SuccessThreshold = successThreshold; + TcpSocket = tcpSocket; + TimeoutSeconds = timeoutSeconds; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets one and only one of the following should be specified. + /// Exec specifies the action to take. + /// + [JsonProperty(PropertyName = "exec")] + public V1ExecAction Exec { get; set; } + + /// + /// Gets or sets minimum consecutive failures for the probe to be + /// considered failed after having succeeded. Defaults to 3. Minimum + /// value is 1. + /// + [JsonProperty(PropertyName = "failureThreshold")] + public int? FailureThreshold { get; set; } + + /// + /// Gets or sets hTTPGet specifies the http request to perform. + /// + [JsonProperty(PropertyName = "httpGet")] + public V1HTTPGetAction HttpGet { get; set; } + + /// + /// Gets or sets number of seconds after the container has started + /// before liveness probes are initiated. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#container-probes + /// + [JsonProperty(PropertyName = "initialDelaySeconds")] + public int? InitialDelaySeconds { get; set; } + + /// + /// Gets or sets how often (in seconds) to perform the probe. Default + /// to 10 seconds. Minimum value is 1. + /// + [JsonProperty(PropertyName = "periodSeconds")] + public int? PeriodSeconds { get; set; } + + /// + /// Gets or sets minimum consecutive successes for the probe to be + /// considered successful after having failed. Defaults to 1. Must be 1 + /// for liveness. Minimum value is 1. + /// + [JsonProperty(PropertyName = "successThreshold")] + public int? SuccessThreshold { get; set; } + + /// + /// Gets or sets tCPSocket specifies an action involving a TCP port. + /// TCP hooks not yet supported + /// + [JsonProperty(PropertyName = "tcpSocket")] + public V1TCPSocketAction TcpSocket { get; set; } + + /// + /// Gets or sets number of seconds after which the probe times out. + /// Defaults to 1 second. Minimum value is 1. More info: + /// http://kubernetes.io/docs/user-guide/pod-states#container-probes + /// + [JsonProperty(PropertyName = "timeoutSeconds")] + public int? TimeoutSeconds { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (HttpGet != null) + { + HttpGet.Validate(); + } + if (TcpSocket != null) + { + TcpSocket.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1ProjectedVolumeSource.cs b/src/generated/Models/V1ProjectedVolumeSource.cs new file mode 100755 index 000000000..9f984cd93 --- /dev/null +++ b/src/generated/Models/V1ProjectedVolumeSource.cs @@ -0,0 +1,77 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Represents a projected volume source + /// + public partial class V1ProjectedVolumeSource + { + /// + /// Initializes a new instance of the V1ProjectedVolumeSource class. + /// + public V1ProjectedVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ProjectedVolumeSource class. + /// + /// list of volume projections + /// Mode bits to use on created files by + /// default. Must be a value between 0 and 0777. Directories within the + /// path are not affected by this setting. This might be in conflict + /// with other options that affect the file mode, like fsGroup, and the + /// result can be other mode bits set. + public V1ProjectedVolumeSource(IList sources, int? defaultMode = default(int?)) + { + DefaultMode = defaultMode; + Sources = sources; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets mode bits to use on created files by default. Must be + /// a value between 0 and 0777. Directories within the path are not + /// affected by this setting. This might be in conflict with other + /// options that affect the file mode, like fsGroup, and the result can + /// be other mode bits set. + /// + [JsonProperty(PropertyName = "defaultMode")] + public int? DefaultMode { get; set; } + + /// + /// Gets or sets list of volume projections + /// + [JsonProperty(PropertyName = "sources")] + public IList Sources { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Sources == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Sources"); + } + } + } +} diff --git a/src/generated/Models/V1QuobyteVolumeSource.cs b/src/generated/Models/V1QuobyteVolumeSource.cs new file mode 100755 index 000000000..daeb0c87a --- /dev/null +++ b/src/generated/Models/V1QuobyteVolumeSource.cs @@ -0,0 +1,110 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte + /// volumes do not support ownership management or SELinux relabeling. + /// + public partial class V1QuobyteVolumeSource + { + /// + /// Initializes a new instance of the V1QuobyteVolumeSource class. + /// + public V1QuobyteVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1QuobyteVolumeSource class. + /// + /// Registry represents a single or multiple + /// Quobyte Registry services specified as a string as host:port pair + /// (multiple entries are separated with commas) which acts as the + /// central registry for volumes + /// Volume is a string that references an already + /// created Quobyte volume by name. + /// Group to map volume access to Default is no + /// group + /// ReadOnly here will force the Quobyte + /// volume to be mounted with read-only permissions. Defaults to + /// false. + /// User to map volume access to Defaults to + /// serivceaccount user + public V1QuobyteVolumeSource(string registry, string volume, string group = default(string), bool? readOnlyProperty = default(bool?), string user = default(string)) + { + Group = group; + ReadOnlyProperty = readOnlyProperty; + Registry = registry; + User = user; + Volume = volume; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets group to map volume access to Default is no group + /// + [JsonProperty(PropertyName = "group")] + public string Group { get; set; } + + /// + /// Gets or sets readOnly here will force the Quobyte volume to be + /// mounted with read-only permissions. Defaults to false. + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets registry represents a single or multiple Quobyte + /// Registry services specified as a string as host:port pair (multiple + /// entries are separated with commas) which acts as the central + /// registry for volumes + /// + [JsonProperty(PropertyName = "registry")] + public string Registry { get; set; } + + /// + /// Gets or sets user to map volume access to Defaults to + /// serivceaccount user + /// + [JsonProperty(PropertyName = "user")] + public string User { get; set; } + + /// + /// Gets or sets volume is a string that references an already created + /// Quobyte volume by name. + /// + [JsonProperty(PropertyName = "volume")] + public string Volume { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Registry == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Registry"); + } + if (Volume == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Volume"); + } + } + } +} diff --git a/src/generated/Models/V1RBDVolumeSource.cs b/src/generated/Models/V1RBDVolumeSource.cs new file mode 100755 index 000000000..00e1c73fc --- /dev/null +++ b/src/generated/Models/V1RBDVolumeSource.cs @@ -0,0 +1,152 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Represents a Rados Block Device mount that lasts the lifetime of a pod. + /// RBD volumes support ownership management and SELinux relabeling. + /// + public partial class V1RBDVolumeSource + { + /// + /// Initializes a new instance of the V1RBDVolumeSource class. + /// + public V1RBDVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1RBDVolumeSource class. + /// + /// The rados image name. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + /// A collection of Ceph monitors. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + /// Filesystem type of the volume that you want to + /// mount. Tip: Ensure that the filesystem type is supported by the + /// host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly + /// inferred to be "ext4" if unspecified. More info: + /// http://kubernetes.io/docs/user-guide/volumes#rbd + /// Keyring is the path to key ring for RBDUser. + /// Default is /etc/ceph/keyring. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + /// The rados pool name. Default is rbd. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it. + /// ReadOnly here will force the + /// ReadOnly setting in VolumeMounts. Defaults to false. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + /// SecretRef is name of the authentication + /// secret for RBDUser. If provided overrides keyring. Default is nil. + /// More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + /// The rados user name. Default is admin. More + /// info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + public V1RBDVolumeSource(string image, IList monitors, string fsType = default(string), string keyring = default(string), string pool = default(string), bool? readOnlyProperty = default(bool?), V1LocalObjectReference secretRef = default(V1LocalObjectReference), string user = default(string)) + { + FsType = fsType; + Image = image; + Keyring = keyring; + Monitors = monitors; + Pool = pool; + ReadOnlyProperty = readOnlyProperty; + SecretRef = secretRef; + User = user; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets filesystem type of the volume that you want to mount. + /// Tip: Ensure that the filesystem type is supported by the host + /// operating system. Examples: "ext4", "xfs", "ntfs". Implicitly + /// inferred to be "ext4" if unspecified. More info: + /// http://kubernetes.io/docs/user-guide/volumes#rbd + /// + [JsonProperty(PropertyName = "fsType")] + public string FsType { get; set; } + + /// + /// Gets or sets the rados image name. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + /// + [JsonProperty(PropertyName = "image")] + public string Image { get; set; } + + /// + /// Gets or sets keyring is the path to key ring for RBDUser. Default + /// is /etc/ceph/keyring. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + /// + [JsonProperty(PropertyName = "keyring")] + public string Keyring { get; set; } + + /// + /// Gets or sets a collection of Ceph monitors. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + /// + [JsonProperty(PropertyName = "monitors")] + public IList Monitors { get; set; } + + /// + /// Gets or sets the rados pool name. Default is rbd. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it. + /// + [JsonProperty(PropertyName = "pool")] + public string Pool { get; set; } + + /// + /// Gets or sets readOnly here will force the ReadOnly setting in + /// VolumeMounts. Defaults to false. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets secretRef is name of the authentication secret for + /// RBDUser. If provided overrides keyring. Default is nil. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + /// + [JsonProperty(PropertyName = "secretRef")] + public V1LocalObjectReference SecretRef { get; set; } + + /// + /// Gets or sets the rados user name. Default is admin. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it + /// + [JsonProperty(PropertyName = "user")] + public string User { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Image == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Image"); + } + if (Monitors == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Monitors"); + } + } + } +} diff --git a/src/generated/Models/V1ReplicationController.cs b/src/generated/Models/V1ReplicationController.cs new file mode 100755 index 000000000..48738babb --- /dev/null +++ b/src/generated/Models/V1ReplicationController.cs @@ -0,0 +1,129 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ReplicationController represents the configuration of a replication + /// controller. + /// + public partial class V1ReplicationController + { + /// + /// Initializes a new instance of the V1ReplicationController class. + /// + public V1ReplicationController() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ReplicationController class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// If the Labels of a ReplicationController are + /// empty, they are defaulted to be the same as the Pod(s) that the + /// replication controller manages. Standard object's metadata. More + /// info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Spec defines the specification of the desired + /// behavior of the replication controller. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// Status is the most recently observed status of + /// the replication controller. This data may be out of date by some + /// window of time. Populated by the system. Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1ReplicationController(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1ReplicationControllerSpec spec = default(V1ReplicationControllerSpec), V1ReplicationControllerStatus status = default(V1ReplicationControllerStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets if the Labels of a ReplicationController are empty, + /// they are defaulted to be the same as the Pod(s) that the + /// replication controller manages. Standard object's metadata. More + /// info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec defines the specification of the desired behavior + /// of the replication controller. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1ReplicationControllerSpec Spec { get; set; } + + /// + /// Gets or sets status is the most recently observed status of the + /// replication controller. This data may be out of date by some window + /// of time. Populated by the system. Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "status")] + public V1ReplicationControllerStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1ReplicationControllerCondition.cs b/src/generated/Models/V1ReplicationControllerCondition.cs new file mode 100755 index 000000000..97a63fb61 --- /dev/null +++ b/src/generated/Models/V1ReplicationControllerCondition.cs @@ -0,0 +1,105 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ReplicationControllerCondition describes the state of a replication + /// controller at a certain point. + /// + public partial class V1ReplicationControllerCondition + { + /// + /// Initializes a new instance of the V1ReplicationControllerCondition + /// class. + /// + public V1ReplicationControllerCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ReplicationControllerCondition + /// class. + /// + /// Status of the condition, one of True, False, + /// Unknown. + /// Type of replication controller + /// condition. + /// The last time the condition + /// transitioned from one status to another. + /// A human readable message indicating details + /// about the transition. + /// The reason for the condition's last + /// transition. + public V1ReplicationControllerCondition(string status, string type, System.DateTime? lastTransitionTime = default(System.DateTime?), string message = default(string), string reason = default(string)) + { + LastTransitionTime = lastTransitionTime; + Message = message; + Reason = reason; + Status = status; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the last time the condition transitioned from one + /// status to another. + /// + [JsonProperty(PropertyName = "lastTransitionTime")] + public System.DateTime? LastTransitionTime { get; set; } + + /// + /// Gets or sets a human readable message indicating details about the + /// transition. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets the reason for the condition's last transition. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets status of the condition, one of True, False, Unknown. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets type of replication controller condition. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Status"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/src/generated/Models/V1ReplicationControllerList.cs b/src/generated/Models/V1ReplicationControllerList.cs new file mode 100755 index 000000000..7aed875ad --- /dev/null +++ b/src/generated/Models/V1ReplicationControllerList.cs @@ -0,0 +1,117 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ReplicationControllerList is a collection of replication controllers. + /// + public partial class V1ReplicationControllerList + { + /// + /// Initializes a new instance of the V1ReplicationControllerList + /// class. + /// + public V1ReplicationControllerList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ReplicationControllerList + /// class. + /// + /// List of replication controllers. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1ReplicationControllerList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of replication controllers. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1ReplicationControllerSpec.cs b/src/generated/Models/V1ReplicationControllerSpec.cs new file mode 100755 index 000000000..93622b37b --- /dev/null +++ b/src/generated/Models/V1ReplicationControllerSpec.cs @@ -0,0 +1,116 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ReplicationControllerSpec is the specification of a replication + /// controller. + /// + public partial class V1ReplicationControllerSpec + { + /// + /// Initializes a new instance of the V1ReplicationControllerSpec + /// class. + /// + public V1ReplicationControllerSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ReplicationControllerSpec + /// class. + /// + /// Minimum number of seconds for which a + /// newly created pod should be ready without any of its container + /// crashing, for it to be considered available. Defaults to 0 (pod + /// will be considered available as soon as it is ready) + /// Replicas is the number of desired replicas. + /// This is a pointer to distinguish between explicit zero and + /// unspecified. Defaults to 1. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller + /// Selector is a label query over pods that + /// should match the Replicas count. If Selector is empty, it is + /// defaulted to the labels present on the Pod template. Label keys and + /// values that must match in order to be controlled by this + /// replication controller, if empty defaulted to labels on Pod + /// template. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// Template is the object that describes the + /// pod that will be created if insufficient replicas are detected. + /// This takes precedence over a TemplateRef. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#pod-template + public V1ReplicationControllerSpec(int? minReadySeconds = default(int?), int? replicas = default(int?), IDictionary selector = default(IDictionary), V1PodTemplateSpec template = default(V1PodTemplateSpec)) + { + MinReadySeconds = minReadySeconds; + Replicas = replicas; + Selector = selector; + Template = template; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets minimum number of seconds for which a newly created + /// pod should be ready without any of its container crashing, for it + /// to be considered available. Defaults to 0 (pod will be considered + /// available as soon as it is ready) + /// + [JsonProperty(PropertyName = "minReadySeconds")] + public int? MinReadySeconds { get; set; } + + /// + /// Gets or sets replicas is the number of desired replicas. This is a + /// pointer to distinguish between explicit zero and unspecified. + /// Defaults to 1. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller + /// + [JsonProperty(PropertyName = "replicas")] + public int? Replicas { get; set; } + + /// + /// Gets or sets selector is a label query over pods that should match + /// the Replicas count. If Selector is empty, it is defaulted to the + /// labels present on the Pod template. Label keys and values that must + /// match in order to be controlled by this replication controller, if + /// empty defaulted to labels on Pod template. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// + [JsonProperty(PropertyName = "selector")] + public IDictionary Selector { get; set; } + + /// + /// Gets or sets template is the object that describes the pod that + /// will be created if insufficient replicas are detected. This takes + /// precedence over a TemplateRef. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#pod-template + /// + [JsonProperty(PropertyName = "template")] + public V1PodTemplateSpec Template { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Template != null) + { + Template.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1ReplicationControllerStatus.cs b/src/generated/Models/V1ReplicationControllerStatus.cs new file mode 100755 index 000000000..32a83368f --- /dev/null +++ b/src/generated/Models/V1ReplicationControllerStatus.cs @@ -0,0 +1,126 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ReplicationControllerStatus represents the current status of a + /// replication controller. + /// + public partial class V1ReplicationControllerStatus + { + /// + /// Initializes a new instance of the V1ReplicationControllerStatus + /// class. + /// + public V1ReplicationControllerStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ReplicationControllerStatus + /// class. + /// + /// Replicas is the most recently oberved number + /// of replicas. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller + /// The number of available replicas + /// (ready for at least minReadySeconds) for this replication + /// controller. + /// Represents the latest available + /// observations of a replication controller's current state. + /// The number of pods that have + /// labels matching the labels of the pod template of the replication + /// controller. + /// ObservedGeneration reflects the + /// generation of the most recently observed replication + /// controller. + /// The number of ready replicas for this + /// replication controller. + public V1ReplicationControllerStatus(int replicas, int? availableReplicas = default(int?), IList conditions = default(IList), int? fullyLabeledReplicas = default(int?), long? observedGeneration = default(long?), int? readyReplicas = default(int?)) + { + AvailableReplicas = availableReplicas; + Conditions = conditions; + FullyLabeledReplicas = fullyLabeledReplicas; + ObservedGeneration = observedGeneration; + ReadyReplicas = readyReplicas; + Replicas = replicas; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the number of available replicas (ready for at least + /// minReadySeconds) for this replication controller. + /// + [JsonProperty(PropertyName = "availableReplicas")] + public int? AvailableReplicas { get; set; } + + /// + /// Gets or sets represents the latest available observations of a + /// replication controller's current state. + /// + [JsonProperty(PropertyName = "conditions")] + public IList Conditions { get; set; } + + /// + /// Gets or sets the number of pods that have labels matching the + /// labels of the pod template of the replication controller. + /// + [JsonProperty(PropertyName = "fullyLabeledReplicas")] + public int? FullyLabeledReplicas { get; set; } + + /// + /// Gets or sets observedGeneration reflects the generation of the most + /// recently observed replication controller. + /// + [JsonProperty(PropertyName = "observedGeneration")] + public long? ObservedGeneration { get; set; } + + /// + /// Gets or sets the number of ready replicas for this replication + /// controller. + /// + [JsonProperty(PropertyName = "readyReplicas")] + public int? ReadyReplicas { get; set; } + + /// + /// Gets or sets replicas is the most recently oberved number of + /// replicas. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller + /// + [JsonProperty(PropertyName = "replicas")] + public int Replicas { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Conditions != null) + { + foreach (var element in Conditions) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1ResourceAttributes.cs b/src/generated/Models/V1ResourceAttributes.cs new file mode 100755 index 000000000..9c0e9f854 --- /dev/null +++ b/src/generated/Models/V1ResourceAttributes.cs @@ -0,0 +1,118 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ResourceAttributes includes the authorization attributes available for + /// resource requests to the Authorizer interface + /// + public partial class V1ResourceAttributes + { + /// + /// Initializes a new instance of the V1ResourceAttributes class. + /// + public V1ResourceAttributes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ResourceAttributes class. + /// + /// Group is the API Group of the Resource. "*" + /// means all. + /// Name is the name of the resource being requested + /// for a "get" or deleted for a "delete". "" (empty) means + /// all. + /// Namespace is the namespace of the + /// action being requested. Currently, there is no distinction between + /// no namespace and all namespaces "" (empty) is defaulted for + /// LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped + /// resources "" (empty) means "all" for namespace scoped resources + /// from a SubjectAccessReview or SelfSubjectAccessReview + /// Resource is one of the existing resource + /// types. "*" means all. + /// Subresource is one of the existing + /// resource types. "" means none. + /// Verb is a kubernetes resource API verb, like: + /// get, list, watch, create, update, delete, proxy. "*" means + /// all. + /// Version is the API Version of the Resource. + /// "*" means all. + public V1ResourceAttributes(string group = default(string), string name = default(string), string namespaceProperty = default(string), string resource = default(string), string subresource = default(string), string verb = default(string), string version = default(string)) + { + Group = group; + Name = name; + NamespaceProperty = namespaceProperty; + Resource = resource; + Subresource = subresource; + Verb = verb; + Version = version; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets group is the API Group of the Resource. "*" means + /// all. + /// + [JsonProperty(PropertyName = "group")] + public string Group { get; set; } + + /// + /// Gets or sets name is the name of the resource being requested for a + /// "get" or deleted for a "delete". "" (empty) means all. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets namespace is the namespace of the action being + /// requested. Currently, there is no distinction between no namespace + /// and all namespaces "" (empty) is defaulted for + /// LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped + /// resources "" (empty) means "all" for namespace scoped resources + /// from a SubjectAccessReview or SelfSubjectAccessReview + /// + [JsonProperty(PropertyName = "namespace")] + public string NamespaceProperty { get; set; } + + /// + /// Gets or sets resource is one of the existing resource types. "*" + /// means all. + /// + [JsonProperty(PropertyName = "resource")] + public string Resource { get; set; } + + /// + /// Gets or sets subresource is one of the existing resource types. "" + /// means none. + /// + [JsonProperty(PropertyName = "subresource")] + public string Subresource { get; set; } + + /// + /// Gets or sets verb is a kubernetes resource API verb, like: get, + /// list, watch, create, update, delete, proxy. "*" means all. + /// + [JsonProperty(PropertyName = "verb")] + public string Verb { get; set; } + + /// + /// Gets or sets version is the API Version of the Resource. "*" means + /// all. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + } +} diff --git a/src/generated/Models/V1ResourceFieldSelector.cs b/src/generated/Models/V1ResourceFieldSelector.cs new file mode 100755 index 000000000..b510304e4 --- /dev/null +++ b/src/generated/Models/V1ResourceFieldSelector.cs @@ -0,0 +1,80 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ResourceFieldSelector represents container resources (cpu, memory) and + /// their output format + /// + public partial class V1ResourceFieldSelector + { + /// + /// Initializes a new instance of the V1ResourceFieldSelector class. + /// + public V1ResourceFieldSelector() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ResourceFieldSelector class. + /// + /// Required: resource to select + /// Container name: required for volumes, + /// optional for env vars + /// Specifies the output format of the exposed + /// resources, defaults to "1" + public V1ResourceFieldSelector(string resource, string containerName = default(string), string divisor = default(string)) + { + ContainerName = containerName; + Divisor = divisor; + Resource = resource; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets container name: required for volumes, optional for env + /// vars + /// + [JsonProperty(PropertyName = "containerName")] + public string ContainerName { get; set; } + + /// + /// Gets or sets specifies the output format of the exposed resources, + /// defaults to "1" + /// + [JsonProperty(PropertyName = "divisor")] + public string Divisor { get; set; } + + /// + /// Gets or sets required: resource to select + /// + [JsonProperty(PropertyName = "resource")] + public string Resource { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Resource == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Resource"); + } + } + } +} diff --git a/src/generated/Models/V1ResourceQuota.cs b/src/generated/Models/V1ResourceQuota.cs new file mode 100755 index 000000000..cbfc22479 --- /dev/null +++ b/src/generated/Models/V1ResourceQuota.cs @@ -0,0 +1,101 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ResourceQuota sets aggregate quota restrictions enforced per namespace + /// + public partial class V1ResourceQuota + { + /// + /// Initializes a new instance of the V1ResourceQuota class. + /// + public V1ResourceQuota() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ResourceQuota class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Spec defines the desired quota. + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// Status defines the actual enforced quota and + /// its current usage. + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1ResourceQuota(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1ResourceQuotaSpec spec = default(V1ResourceQuotaSpec), V1ResourceQuotaStatus status = default(V1ResourceQuotaStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec defines the desired quota. + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1ResourceQuotaSpec Spec { get; set; } + + /// + /// Gets or sets status defines the actual enforced quota and its + /// current usage. + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "status")] + public V1ResourceQuotaStatus Status { get; set; } + + } +} diff --git a/src/generated/Models/V1ResourceQuotaList.cs b/src/generated/Models/V1ResourceQuotaList.cs new file mode 100755 index 000000000..2b093257f --- /dev/null +++ b/src/generated/Models/V1ResourceQuotaList.cs @@ -0,0 +1,106 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ResourceQuotaList is a list of ResourceQuota items. + /// + public partial class V1ResourceQuotaList + { + /// + /// Initializes a new instance of the V1ResourceQuotaList class. + /// + public V1ResourceQuotaList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ResourceQuotaList class. + /// + /// Items is a list of ResourceQuota objects. More + /// info: + /// http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1ResourceQuotaList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of ResourceQuota objects. More info: + /// http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + } + } +} diff --git a/src/generated/Models/V1ResourceQuotaSpec.cs b/src/generated/Models/V1ResourceQuotaSpec.cs new file mode 100755 index 000000000..cbd9bbce7 --- /dev/null +++ b/src/generated/Models/V1ResourceQuotaSpec.cs @@ -0,0 +1,63 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ResourceQuotaSpec defines the desired hard limits to enforce for Quota. + /// + public partial class V1ResourceQuotaSpec + { + /// + /// Initializes a new instance of the V1ResourceQuotaSpec class. + /// + public V1ResourceQuotaSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ResourceQuotaSpec class. + /// + /// Hard is the set of desired hard limits for each + /// named resource. More info: + /// http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota + /// A collection of filters that must match each + /// object tracked by a quota. If not specified, the quota matches all + /// objects. + public V1ResourceQuotaSpec(IDictionary hard = default(IDictionary), IList scopes = default(IList)) + { + Hard = hard; + Scopes = scopes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets hard is the set of desired hard limits for each named + /// resource. More info: + /// http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota + /// + [JsonProperty(PropertyName = "hard")] + public IDictionary Hard { get; set; } + + /// + /// Gets or sets a collection of filters that must match each object + /// tracked by a quota. If not specified, the quota matches all + /// objects. + /// + [JsonProperty(PropertyName = "scopes")] + public IList Scopes { get; set; } + + } +} diff --git a/src/generated/Models/V1ResourceQuotaStatus.cs b/src/generated/Models/V1ResourceQuotaStatus.cs new file mode 100755 index 000000000..1184acad9 --- /dev/null +++ b/src/generated/Models/V1ResourceQuotaStatus.cs @@ -0,0 +1,61 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ResourceQuotaStatus defines the enforced hard limits and observed use. + /// + public partial class V1ResourceQuotaStatus + { + /// + /// Initializes a new instance of the V1ResourceQuotaStatus class. + /// + public V1ResourceQuotaStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ResourceQuotaStatus class. + /// + /// Hard is the set of enforced hard limits for each + /// named resource. More info: + /// http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota + /// Used is the current observed total usage of the + /// resource in the namespace. + public V1ResourceQuotaStatus(IDictionary hard = default(IDictionary), IDictionary used = default(IDictionary)) + { + Hard = hard; + Used = used; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets hard is the set of enforced hard limits for each named + /// resource. More info: + /// http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota + /// + [JsonProperty(PropertyName = "hard")] + public IDictionary Hard { get; set; } + + /// + /// Gets or sets used is the current observed total usage of the + /// resource in the namespace. + /// + [JsonProperty(PropertyName = "used")] + public IDictionary Used { get; set; } + + } +} diff --git a/src/generated/Models/V1ResourceRequirements.cs b/src/generated/Models/V1ResourceRequirements.cs new file mode 100755 index 000000000..7d8756dd0 --- /dev/null +++ b/src/generated/Models/V1ResourceRequirements.cs @@ -0,0 +1,67 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ResourceRequirements describes the compute resource requirements. + /// + public partial class V1ResourceRequirements + { + /// + /// Initializes a new instance of the V1ResourceRequirements class. + /// + public V1ResourceRequirements() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ResourceRequirements class. + /// + /// Limits describes the maximum amount of compute + /// resources allowed. More info: + /// http://kubernetes.io/docs/user-guide/compute-resources/ + /// Requests describes the minimum amount of + /// compute resources required. If Requests is omitted for a container, + /// it defaults to Limits if that is explicitly specified, otherwise to + /// an implementation-defined value. More info: + /// http://kubernetes.io/docs/user-guide/compute-resources/ + public V1ResourceRequirements(IDictionary limits = default(IDictionary), IDictionary requests = default(IDictionary)) + { + Limits = limits; + Requests = requests; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets limits describes the maximum amount of compute + /// resources allowed. More info: + /// http://kubernetes.io/docs/user-guide/compute-resources/ + /// + [JsonProperty(PropertyName = "limits")] + public IDictionary Limits { get; set; } + + /// + /// Gets or sets requests describes the minimum amount of compute + /// resources required. If Requests is omitted for a container, it + /// defaults to Limits if that is explicitly specified, otherwise to an + /// implementation-defined value. More info: + /// http://kubernetes.io/docs/user-guide/compute-resources/ + /// + [JsonProperty(PropertyName = "requests")] + public IDictionary Requests { get; set; } + + } +} diff --git a/src/generated/Models/V1SELinuxOptions.cs b/src/generated/Models/V1SELinuxOptions.cs new file mode 100755 index 000000000..e3e574e04 --- /dev/null +++ b/src/generated/Models/V1SELinuxOptions.cs @@ -0,0 +1,77 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// SELinuxOptions are the labels to be applied to the container + /// + public partial class V1SELinuxOptions + { + /// + /// Initializes a new instance of the V1SELinuxOptions class. + /// + public V1SELinuxOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1SELinuxOptions class. + /// + /// Level is SELinux level label that applies to + /// the container. + /// Role is a SELinux role label that applies to the + /// container. + /// Type is a SELinux type label that applies to the + /// container. + /// User is a SELinux user label that applies to the + /// container. + public V1SELinuxOptions(string level = default(string), string role = default(string), string type = default(string), string user = default(string)) + { + Level = level; + Role = role; + Type = type; + User = user; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets level is SELinux level label that applies to the + /// container. + /// + [JsonProperty(PropertyName = "level")] + public string Level { get; set; } + + /// + /// Gets or sets role is a SELinux role label that applies to the + /// container. + /// + [JsonProperty(PropertyName = "role")] + public string Role { get; set; } + + /// + /// Gets or sets type is a SELinux type label that applies to the + /// container. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets user is a SELinux user label that applies to the + /// container. + /// + [JsonProperty(PropertyName = "user")] + public string User { get; set; } + + } +} diff --git a/src/generated/Models/V1Scale.cs b/src/generated/Models/V1Scale.cs new file mode 100755 index 000000000..75f0a1e01 --- /dev/null +++ b/src/generated/Models/V1Scale.cs @@ -0,0 +1,114 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Scale represents a scaling request for a resource. + /// + public partial class V1Scale + { + /// + /// Initializes a new instance of the V1Scale class. + /// + public V1Scale() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Scale class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object metadata; More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. + /// defines the behavior of the scale. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// current status of the scale. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// Read-only. + public V1Scale(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1ScaleSpec spec = default(V1ScaleSpec), V1ScaleStatus status = default(V1ScaleStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object metadata; More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets defines the behavior of the scale. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// + [JsonProperty(PropertyName = "spec")] + public V1ScaleSpec Spec { get; set; } + + /// + /// Gets or sets current status of the scale. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// Read-only. + /// + [JsonProperty(PropertyName = "status")] + public V1ScaleStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1ScaleIOVolumeSource.cs b/src/generated/Models/V1ScaleIOVolumeSource.cs new file mode 100755 index 000000000..43c05f2b4 --- /dev/null +++ b/src/generated/Models/V1ScaleIOVolumeSource.cs @@ -0,0 +1,164 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ScaleIOVolumeSource represents a persistent ScaleIO volume + /// + public partial class V1ScaleIOVolumeSource + { + /// + /// Initializes a new instance of the V1ScaleIOVolumeSource class. + /// + public V1ScaleIOVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ScaleIOVolumeSource class. + /// + /// The host address of the ScaleIO API + /// Gateway. + /// SecretRef references to the secret for + /// ScaleIO user and other sensitive information. If this is not + /// provided, Login operation will fail. + /// The name of the storage system as configured + /// in ScaleIO. + /// Filesystem type to mount. Must be a filesystem + /// type supported by the host operating system. Ex. "ext4", "xfs", + /// "ntfs". Implicitly inferred to be "ext4" if unspecified. + /// The name of the Protection Domain + /// for the configured storage (defaults to "default"). + /// Defaults to false (read/write). + /// ReadOnly here will force the ReadOnly setting in + /// VolumeMounts. + /// Flag to enable/disable SSL communication + /// with Gateway, default false + /// Indicates whether the storage for a + /// volume should be thick or thin (defaults to "thin"). + /// The Storage Pool associated with the + /// protection domain (defaults to "default"). + /// The name of a volume already created in + /// the ScaleIO system that is associated with this volume + /// source. + public V1ScaleIOVolumeSource(string gateway, V1LocalObjectReference secretRef, string system, string fsType = default(string), string protectionDomain = default(string), bool? readOnlyProperty = default(bool?), bool? sslEnabled = default(bool?), string storageMode = default(string), string storagePool = default(string), string volumeName = default(string)) + { + FsType = fsType; + Gateway = gateway; + ProtectionDomain = protectionDomain; + ReadOnlyProperty = readOnlyProperty; + SecretRef = secretRef; + SslEnabled = sslEnabled; + StorageMode = storageMode; + StoragePool = storagePool; + System = system; + VolumeName = volumeName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets filesystem type to mount. Must be a filesystem type + /// supported by the host operating system. Ex. "ext4", "xfs", "ntfs". + /// Implicitly inferred to be "ext4" if unspecified. + /// + [JsonProperty(PropertyName = "fsType")] + public string FsType { get; set; } + + /// + /// Gets or sets the host address of the ScaleIO API Gateway. + /// + [JsonProperty(PropertyName = "gateway")] + public string Gateway { get; set; } + + /// + /// Gets or sets the name of the Protection Domain for the configured + /// storage (defaults to "default"). + /// + [JsonProperty(PropertyName = "protectionDomain")] + public string ProtectionDomain { get; set; } + + /// + /// Gets or sets defaults to false (read/write). ReadOnly here will + /// force the ReadOnly setting in VolumeMounts. + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets secretRef references to the secret for ScaleIO user + /// and other sensitive information. If this is not provided, Login + /// operation will fail. + /// + [JsonProperty(PropertyName = "secretRef")] + public V1LocalObjectReference SecretRef { get; set; } + + /// + /// Gets or sets flag to enable/disable SSL communication with Gateway, + /// default false + /// + [JsonProperty(PropertyName = "sslEnabled")] + public bool? SslEnabled { get; set; } + + /// + /// Gets or sets indicates whether the storage for a volume should be + /// thick or thin (defaults to "thin"). + /// + [JsonProperty(PropertyName = "storageMode")] + public string StorageMode { get; set; } + + /// + /// Gets or sets the Storage Pool associated with the protection domain + /// (defaults to "default"). + /// + [JsonProperty(PropertyName = "storagePool")] + public string StoragePool { get; set; } + + /// + /// Gets or sets the name of the storage system as configured in + /// ScaleIO. + /// + [JsonProperty(PropertyName = "system")] + public string System { get; set; } + + /// + /// Gets or sets the name of a volume already created in the ScaleIO + /// system that is associated with this volume source. + /// + [JsonProperty(PropertyName = "volumeName")] + public string VolumeName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Gateway == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Gateway"); + } + if (SecretRef == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SecretRef"); + } + if (System == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "System"); + } + } + } +} diff --git a/src/generated/Models/V1ScaleSpec.cs b/src/generated/Models/V1ScaleSpec.cs new file mode 100755 index 000000000..91c16593d --- /dev/null +++ b/src/generated/Models/V1ScaleSpec.cs @@ -0,0 +1,46 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ScaleSpec describes the attributes of a scale subresource. + /// + public partial class V1ScaleSpec + { + /// + /// Initializes a new instance of the V1ScaleSpec class. + /// + public V1ScaleSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ScaleSpec class. + /// + /// desired number of instances for the scaled + /// object. + public V1ScaleSpec(int? replicas = default(int?)) + { + Replicas = replicas; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets desired number of instances for the scaled object. + /// + [JsonProperty(PropertyName = "replicas")] + public int? Replicas { get; set; } + + } +} diff --git a/src/generated/Models/V1ScaleStatus.cs b/src/generated/Models/V1ScaleStatus.cs new file mode 100755 index 000000000..78358ffbc --- /dev/null +++ b/src/generated/Models/V1ScaleStatus.cs @@ -0,0 +1,74 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ScaleStatus represents the current status of a scale subresource. + /// + public partial class V1ScaleStatus + { + /// + /// Initializes a new instance of the V1ScaleStatus class. + /// + public V1ScaleStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ScaleStatus class. + /// + /// actual number of observed instances of the + /// scaled object. + /// label query over pods that should match the + /// replicas count. This is same as the label selector but in the + /// string format to avoid introspection by clients. The string will be + /// in the same format as the query-param syntax. More info about label + /// selectors: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + public V1ScaleStatus(int replicas, string selector = default(string)) + { + Replicas = replicas; + Selector = selector; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets actual number of observed instances of the scaled + /// object. + /// + [JsonProperty(PropertyName = "replicas")] + public int Replicas { get; set; } + + /// + /// Gets or sets label query over pods that should match the replicas + /// count. This is same as the label selector but in the string format + /// to avoid introspection by clients. The string will be in the same + /// format as the query-param syntax. More info about label selectors: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// + [JsonProperty(PropertyName = "selector")] + public string Selector { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1Secret.cs b/src/generated/Models/V1Secret.cs new file mode 100755 index 000000000..025427f8c --- /dev/null +++ b/src/generated/Models/V1Secret.cs @@ -0,0 +1,125 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Secret holds secret data of a certain type. The total bytes of the + /// values in the Data field must be less than MaxSecretSize bytes. + /// + public partial class V1Secret + { + /// + /// Initializes a new instance of the V1Secret class. + /// + public V1Secret() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Secret class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Data contains the secret data. Each key must be + /// a valid DNS_SUBDOMAIN or leading dot followed by valid + /// DNS_SUBDOMAIN. The serialized form of the secret data is a base64 + /// encoded string, representing the arbitrary (possibly non-string) + /// data value here. Described in + /// https://tools.ietf.org/html/rfc4648#section-4 + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// stringData allows specifying non-binary + /// secret data in string form. It is provided as a write-only + /// convenience method. All keys and values are merged into the data + /// field on write, overwriting any existing values. It is never output + /// when reading from the API. + /// Used to facilitate programmatic handling of + /// secret data. + public V1Secret(string apiVersion = default(string), IDictionary data = default(IDictionary), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), IDictionary stringData = default(IDictionary), string type = default(string)) + { + ApiVersion = apiVersion; + Data = data; + Kind = kind; + Metadata = metadata; + StringData = stringData; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets data contains the secret data. Each key must be a + /// valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. + /// The serialized form of the secret data is a base64 encoded string, + /// representing the arbitrary (possibly non-string) data value here. + /// Described in https://tools.ietf.org/html/rfc4648#section-4 + /// + [JsonProperty(PropertyName = "data")] + public IDictionary Data { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets stringData allows specifying non-binary secret data in + /// string form. It is provided as a write-only convenience method. All + /// keys and values are merged into the data field on write, + /// overwriting any existing values. It is never output when reading + /// from the API. + /// + [JsonProperty(PropertyName = "stringData")] + public IDictionary StringData { get; set; } + + /// + /// Gets or sets used to facilitate programmatic handling of secret + /// data. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + } +} diff --git a/src/generated/Models/V1SecretEnvSource.cs b/src/generated/Models/V1SecretEnvSource.cs new file mode 100755 index 000000000..02ae80232 --- /dev/null +++ b/src/generated/Models/V1SecretEnvSource.cs @@ -0,0 +1,60 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// SecretEnvSource selects a Secret to populate the environment variables + /// with. + /// + /// The contents of the target Secret's Data field will represent the + /// key-value pairs as environment variables. + /// + public partial class V1SecretEnvSource + { + /// + /// Initializes a new instance of the V1SecretEnvSource class. + /// + public V1SecretEnvSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1SecretEnvSource class. + /// + /// Name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// Specify whether the Secret must be + /// defined + public V1SecretEnvSource(string name = default(string), bool? optional = default(bool?)) + { + Name = name; + Optional = optional; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets specify whether the Secret must be defined + /// + [JsonProperty(PropertyName = "optional")] + public bool? Optional { get; set; } + + } +} diff --git a/src/generated/Models/V1SecretKeySelector.cs b/src/generated/Models/V1SecretKeySelector.cs new file mode 100755 index 000000000..9298d1cd5 --- /dev/null +++ b/src/generated/Models/V1SecretKeySelector.cs @@ -0,0 +1,80 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SecretKeySelector selects a key of a Secret. + /// + public partial class V1SecretKeySelector + { + /// + /// Initializes a new instance of the V1SecretKeySelector class. + /// + public V1SecretKeySelector() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1SecretKeySelector class. + /// + /// The key of the secret to select from. Must be a + /// valid secret key. + /// Name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// Specify whether the Secret or it's key must + /// be defined + public V1SecretKeySelector(string key, string name = default(string), bool? optional = default(bool?)) + { + Key = key; + Name = name; + Optional = optional; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the key of the secret to select from. Must be a valid + /// secret key. + /// + [JsonProperty(PropertyName = "key")] + public string Key { get; set; } + + /// + /// Gets or sets name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets specify whether the Secret or it's key must be defined + /// + [JsonProperty(PropertyName = "optional")] + public bool? Optional { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Key == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Key"); + } + } + } +} diff --git a/src/generated/Models/V1SecretList.cs b/src/generated/Models/V1SecretList.cs new file mode 100755 index 000000000..5c10dd02a --- /dev/null +++ b/src/generated/Models/V1SecretList.cs @@ -0,0 +1,105 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SecretList is a list of Secret. + /// + public partial class V1SecretList + { + /// + /// Initializes a new instance of the V1SecretList class. + /// + public V1SecretList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1SecretList class. + /// + /// Items is a list of secret objects. More info: + /// http://kubernetes.io/docs/user-guide/secrets + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1SecretList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of secret objects. More info: + /// http://kubernetes.io/docs/user-guide/secrets + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + } + } +} diff --git a/src/generated/Models/V1SecretProjection.cs b/src/generated/Models/V1SecretProjection.cs new file mode 100755 index 000000000..d6c2b0c80 --- /dev/null +++ b/src/generated/Models/V1SecretProjection.cs @@ -0,0 +1,85 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Adapts a secret into a projected volume. + /// + /// The contents of the target Secret's Data field will be presented in a + /// projected volume as files using the keys in the Data field as the file + /// names. Note that this is identical to a secret volume source without + /// the default mode. + /// + public partial class V1SecretProjection + { + /// + /// Initializes a new instance of the V1SecretProjection class. + /// + public V1SecretProjection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1SecretProjection class. + /// + /// If unspecified, each key-value pair in the Data + /// field of the referenced Secret will be projected into the volume as + /// a file whose name is the key and content is the value. If + /// specified, the listed keys will be projected into the specified + /// paths, and unlisted keys will not be present. If a key is specified + /// which is not present in the Secret, the volume setup will error + /// unless it is marked optional. Paths must be relative and may not + /// contain the '..' path or start with '..'. + /// Name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// Specify whether the Secret or its key must + /// be defined + public V1SecretProjection(IList items = default(IList), string name = default(string), bool? optional = default(bool?)) + { + Items = items; + Name = name; + Optional = optional; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if unspecified, each key-value pair in the Data field + /// of the referenced Secret will be projected into the volume as a + /// file whose name is the key and content is the value. If specified, + /// the listed keys will be projected into the specified paths, and + /// unlisted keys will not be present. If a key is specified which is + /// not present in the Secret, the volume setup will error unless it is + /// marked optional. Paths must be relative and may not contain the + /// '..' path or start with '..'. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets name of the referent. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets specify whether the Secret or its key must be defined + /// + [JsonProperty(PropertyName = "optional")] + public bool? Optional { get; set; } + + } +} diff --git a/src/generated/Models/V1SecretVolumeSource.cs b/src/generated/Models/V1SecretVolumeSource.cs new file mode 100755 index 000000000..a5b636158 --- /dev/null +++ b/src/generated/Models/V1SecretVolumeSource.cs @@ -0,0 +1,103 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Adapts a Secret into a volume. + /// + /// The contents of the target Secret's Data field will be presented in a + /// volume as files using the keys in the Data field as the file names. + /// Secret volumes support ownership management and SELinux relabeling. + /// + public partial class V1SecretVolumeSource + { + /// + /// Initializes a new instance of the V1SecretVolumeSource class. + /// + public V1SecretVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1SecretVolumeSource class. + /// + /// Optional: mode bits to use on created + /// files by default. Must be a value between 0 and 0777. Defaults to + /// 0644. Directories within the path are not affected by this setting. + /// This might be in conflict with other options that affect the file + /// mode, like fsGroup, and the result can be other mode bits + /// set. + /// If unspecified, each key-value pair in the Data + /// field of the referenced Secret will be projected into the volume as + /// a file whose name is the key and content is the value. If + /// specified, the listed keys will be projected into the specified + /// paths, and unlisted keys will not be present. If a key is specified + /// which is not present in the Secret, the volume setup will error + /// unless it is marked optional. Paths must be relative and may not + /// contain the '..' path or start with '..'. + /// Specify whether the Secret or it's keys must + /// be defined + /// Name of the secret in the pod's namespace + /// to use. More info: + /// http://kubernetes.io/docs/user-guide/volumes#secrets + public V1SecretVolumeSource(int? defaultMode = default(int?), IList items = default(IList), bool? optional = default(bool?), string secretName = default(string)) + { + DefaultMode = defaultMode; + Items = items; + Optional = optional; + SecretName = secretName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets optional: mode bits to use on created files by + /// default. Must be a value between 0 and 0777. Defaults to 0644. + /// Directories within the path are not affected by this setting. This + /// might be in conflict with other options that affect the file mode, + /// like fsGroup, and the result can be other mode bits set. + /// + [JsonProperty(PropertyName = "defaultMode")] + public int? DefaultMode { get; set; } + + /// + /// Gets or sets if unspecified, each key-value pair in the Data field + /// of the referenced Secret will be projected into the volume as a + /// file whose name is the key and content is the value. If specified, + /// the listed keys will be projected into the specified paths, and + /// unlisted keys will not be present. If a key is specified which is + /// not present in the Secret, the volume setup will error unless it is + /// marked optional. Paths must be relative and may not contain the + /// '..' path or start with '..'. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets specify whether the Secret or it's keys must be + /// defined + /// + [JsonProperty(PropertyName = "optional")] + public bool? Optional { get; set; } + + /// + /// Gets or sets name of the secret in the pod's namespace to use. More + /// info: http://kubernetes.io/docs/user-guide/volumes#secrets + /// + [JsonProperty(PropertyName = "secretName")] + public string SecretName { get; set; } + + } +} diff --git a/src/generated/Models/V1SecurityContext.cs b/src/generated/Models/V1SecurityContext.cs new file mode 100755 index 000000000..493b11f3a --- /dev/null +++ b/src/generated/Models/V1SecurityContext.cs @@ -0,0 +1,128 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// SecurityContext holds security configuration that will be applied to a + /// container. Some fields are present in both SecurityContext and + /// PodSecurityContext. When both are set, the values in SecurityContext + /// take precedence. + /// + public partial class V1SecurityContext + { + /// + /// Initializes a new instance of the V1SecurityContext class. + /// + public V1SecurityContext() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1SecurityContext class. + /// + /// The capabilities to add/drop when + /// running containers. Defaults to the default set of capabilities + /// granted by the container runtime. + /// Run container in privileged mode. + /// Processes in privileged containers are essentially equivalent to + /// root on the host. Defaults to false. + /// Whether this container has a + /// read-only root filesystem. Default is false. + /// Indicates that the container must run as + /// a non-root user. If true, the Kubelet will validate the image at + /// runtime to ensure that it does not run as UID 0 (root) and fail to + /// start the container if it does. If unset or false, no such + /// validation will be performed. May also be set in + /// PodSecurityContext. If set in both SecurityContext and + /// PodSecurityContext, the value specified in SecurityContext takes + /// precedence. + /// The UID to run the entrypoint of the + /// container process. Defaults to user specified in image metadata if + /// unspecified. May also be set in PodSecurityContext. If set in both + /// SecurityContext and PodSecurityContext, the value specified in + /// SecurityContext takes precedence. + /// The SELinux context to be applied to + /// the container. If unspecified, the container runtime will allocate + /// a random SELinux context for each container. May also be set in + /// PodSecurityContext. If set in both SecurityContext and + /// PodSecurityContext, the value specified in SecurityContext takes + /// precedence. + public V1SecurityContext(V1Capabilities capabilities = default(V1Capabilities), bool? privileged = default(bool?), bool? readOnlyRootFilesystem = default(bool?), bool? runAsNonRoot = default(bool?), long? runAsUser = default(long?), V1SELinuxOptions seLinuxOptions = default(V1SELinuxOptions)) + { + Capabilities = capabilities; + Privileged = privileged; + ReadOnlyRootFilesystem = readOnlyRootFilesystem; + RunAsNonRoot = runAsNonRoot; + RunAsUser = runAsUser; + SeLinuxOptions = seLinuxOptions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the capabilities to add/drop when running containers. + /// Defaults to the default set of capabilities granted by the + /// container runtime. + /// + [JsonProperty(PropertyName = "capabilities")] + public V1Capabilities Capabilities { get; set; } + + /// + /// Gets or sets run container in privileged mode. Processes in + /// privileged containers are essentially equivalent to root on the + /// host. Defaults to false. + /// + [JsonProperty(PropertyName = "privileged")] + public bool? Privileged { get; set; } + + /// + /// Gets or sets whether this container has a read-only root + /// filesystem. Default is false. + /// + [JsonProperty(PropertyName = "readOnlyRootFilesystem")] + public bool? ReadOnlyRootFilesystem { get; set; } + + /// + /// Gets or sets indicates that the container must run as a non-root + /// user. If true, the Kubelet will validate the image at runtime to + /// ensure that it does not run as UID 0 (root) and fail to start the + /// container if it does. If unset or false, no such validation will be + /// performed. May also be set in PodSecurityContext. If set in both + /// SecurityContext and PodSecurityContext, the value specified in + /// SecurityContext takes precedence. + /// + [JsonProperty(PropertyName = "runAsNonRoot")] + public bool? RunAsNonRoot { get; set; } + + /// + /// Gets or sets the UID to run the entrypoint of the container + /// process. Defaults to user specified in image metadata if + /// unspecified. May also be set in PodSecurityContext. If set in both + /// SecurityContext and PodSecurityContext, the value specified in + /// SecurityContext takes precedence. + /// + [JsonProperty(PropertyName = "runAsUser")] + public long? RunAsUser { get; set; } + + /// + /// Gets or sets the SELinux context to be applied to the container. If + /// unspecified, the container runtime will allocate a random SELinux + /// context for each container. May also be set in PodSecurityContext. + /// If set in both SecurityContext and PodSecurityContext, the value + /// specified in SecurityContext takes precedence. + /// + [JsonProperty(PropertyName = "seLinuxOptions")] + public V1SELinuxOptions SeLinuxOptions { get; set; } + + } +} diff --git a/src/generated/Models/V1SelfSubjectAccessReview.cs b/src/generated/Models/V1SelfSubjectAccessReview.cs new file mode 100755 index 000000000..066cc5164 --- /dev/null +++ b/src/generated/Models/V1SelfSubjectAccessReview.cs @@ -0,0 +1,116 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SelfSubjectAccessReview checks whether or the current user can perform + /// an action. Not filling in a spec.namespace means "in all namespaces". + /// Self is a special case, because users should always be able to check + /// whether they can perform an action + /// + public partial class V1SelfSubjectAccessReview + { + /// + /// Initializes a new instance of the V1SelfSubjectAccessReview class. + /// + public V1SelfSubjectAccessReview() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1SelfSubjectAccessReview class. + /// + /// Spec holds information about the request being + /// evaluated. user and groups must be empty + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Status is filled in by the server and + /// indicates whether the request is allowed or not + public V1SelfSubjectAccessReview(V1SelfSubjectAccessReviewSpec spec, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1SubjectAccessReviewStatus status = default(V1SubjectAccessReviewStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec holds information about the request being + /// evaluated. user and groups must be empty + /// + [JsonProperty(PropertyName = "spec")] + public V1SelfSubjectAccessReviewSpec Spec { get; set; } + + /// + /// Gets or sets status is filled in by the server and indicates + /// whether the request is allowed or not + /// + [JsonProperty(PropertyName = "status")] + public V1SubjectAccessReviewStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Spec"); + } + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1SelfSubjectAccessReviewSpec.cs b/src/generated/Models/V1SelfSubjectAccessReviewSpec.cs new file mode 100755 index 000000000..49a0cfc35 --- /dev/null +++ b/src/generated/Models/V1SelfSubjectAccessReviewSpec.cs @@ -0,0 +1,61 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// SelfSubjectAccessReviewSpec is a description of the access request. + /// Exactly one of ResourceAuthorizationAttributes and + /// NonResourceAuthorizationAttributes must be set + /// + public partial class V1SelfSubjectAccessReviewSpec + { + /// + /// Initializes a new instance of the V1SelfSubjectAccessReviewSpec + /// class. + /// + public V1SelfSubjectAccessReviewSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1SelfSubjectAccessReviewSpec + /// class. + /// + /// NonResourceAttributes describes + /// information for a non-resource access request + /// ResourceAuthorizationAttributes + /// describes information for a resource access request + public V1SelfSubjectAccessReviewSpec(V1NonResourceAttributes nonResourceAttributes = default(V1NonResourceAttributes), V1ResourceAttributes resourceAttributes = default(V1ResourceAttributes)) + { + NonResourceAttributes = nonResourceAttributes; + ResourceAttributes = resourceAttributes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets nonResourceAttributes describes information for a + /// non-resource access request + /// + [JsonProperty(PropertyName = "nonResourceAttributes")] + public V1NonResourceAttributes NonResourceAttributes { get; set; } + + /// + /// Gets or sets resourceAuthorizationAttributes describes information + /// for a resource access request + /// + [JsonProperty(PropertyName = "resourceAttributes")] + public V1ResourceAttributes ResourceAttributes { get; set; } + + } +} diff --git a/src/generated/Models/V1ServerAddressByClientCIDR.cs b/src/generated/Models/V1ServerAddressByClientCIDR.cs new file mode 100755 index 000000000..6cfb9eb7d --- /dev/null +++ b/src/generated/Models/V1ServerAddressByClientCIDR.cs @@ -0,0 +1,82 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ServerAddressByClientCIDR helps the client to determine the server + /// address that they should use, depending on the clientCIDR that they + /// match. + /// + public partial class V1ServerAddressByClientCIDR + { + /// + /// Initializes a new instance of the V1ServerAddressByClientCIDR + /// class. + /// + public V1ServerAddressByClientCIDR() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ServerAddressByClientCIDR + /// class. + /// + /// The CIDR with which clients can match + /// their IP to figure out the server address that they should + /// use. + /// Address of this server, suitable for a + /// client that matches the above CIDR. This can be a hostname, + /// hostname:port, IP or IP:port. + public V1ServerAddressByClientCIDR(string clientCIDR, string serverAddress) + { + ClientCIDR = clientCIDR; + ServerAddress = serverAddress; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the CIDR with which clients can match their IP to + /// figure out the server address that they should use. + /// + [JsonProperty(PropertyName = "clientCIDR")] + public string ClientCIDR { get; set; } + + /// + /// Gets or sets address of this server, suitable for a client that + /// matches the above CIDR. This can be a hostname, hostname:port, IP + /// or IP:port. + /// + [JsonProperty(PropertyName = "serverAddress")] + public string ServerAddress { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ClientCIDR == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientCIDR"); + } + if (ServerAddress == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServerAddress"); + } + } + } +} diff --git a/src/generated/Models/V1Service.cs b/src/generated/Models/V1Service.cs new file mode 100755 index 000000000..594b087dd --- /dev/null +++ b/src/generated/Models/V1Service.cs @@ -0,0 +1,104 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Service is a named abstraction of software service (for example, mysql) + /// consisting of local port (for example 3306) that the proxy listens on, + /// and the selector that determines which pods will answer requests sent + /// through the proxy. + /// + public partial class V1Service + { + /// + /// Initializes a new instance of the V1Service class. + /// + public V1Service() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Service class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Spec defines the behavior of a service. + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// Most recently observed status of the service. + /// Populated by the system. Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1Service(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1ServiceSpec spec = default(V1ServiceSpec), V1ServiceStatus status = default(V1ServiceStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec defines the behavior of a service. + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1ServiceSpec Spec { get; set; } + + /// + /// Gets or sets most recently observed status of the service. + /// Populated by the system. Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "status")] + public V1ServiceStatus Status { get; set; } + + } +} diff --git a/src/generated/Models/V1ServiceAccount.cs b/src/generated/Models/V1ServiceAccount.cs new file mode 100755 index 000000000..f45e3eb18 --- /dev/null +++ b/src/generated/Models/V1ServiceAccount.cs @@ -0,0 +1,128 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ServiceAccount binds together: * a name, understood by users, and + /// perhaps by peripheral systems, for an identity * a principal that can + /// be authenticated and authorized * a set of secrets + /// + public partial class V1ServiceAccount + { + /// + /// Initializes a new instance of the V1ServiceAccount class. + /// + public V1ServiceAccount() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ServiceAccount class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// AutomountServiceAccountToken + /// indicates whether pods running as this service account should have + /// an API token automatically mounted. Can be overridden at the pod + /// level. + /// ImagePullSecrets is a list of + /// references to secrets in the same namespace to use for pulling any + /// images in pods that reference this ServiceAccount. ImagePullSecrets + /// are distinct from Secrets because Secrets can be mounted in the + /// pod, but ImagePullSecrets are only accessed by the kubelet. More + /// info: + /// http://kubernetes.io/docs/user-guide/secrets#manually-specifying-an-imagepullsecret + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Secrets is the list of secrets allowed to be + /// used by pods running using this ServiceAccount. More info: + /// http://kubernetes.io/docs/user-guide/secrets + public V1ServiceAccount(string apiVersion = default(string), bool? automountServiceAccountToken = default(bool?), IList imagePullSecrets = default(IList), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), IList secrets = default(IList)) + { + ApiVersion = apiVersion; + AutomountServiceAccountToken = automountServiceAccountToken; + ImagePullSecrets = imagePullSecrets; + Kind = kind; + Metadata = metadata; + Secrets = secrets; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets automountServiceAccountToken indicates whether pods + /// running as this service account should have an API token + /// automatically mounted. Can be overridden at the pod level. + /// + [JsonProperty(PropertyName = "automountServiceAccountToken")] + public bool? AutomountServiceAccountToken { get; set; } + + /// + /// Gets or sets imagePullSecrets is a list of references to secrets in + /// the same namespace to use for pulling any images in pods that + /// reference this ServiceAccount. ImagePullSecrets are distinct from + /// Secrets because Secrets can be mounted in the pod, but + /// ImagePullSecrets are only accessed by the kubelet. More info: + /// http://kubernetes.io/docs/user-guide/secrets#manually-specifying-an-imagepullsecret + /// + [JsonProperty(PropertyName = "imagePullSecrets")] + public IList ImagePullSecrets { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets secrets is the list of secrets allowed to be used by + /// pods running using this ServiceAccount. More info: + /// http://kubernetes.io/docs/user-guide/secrets + /// + [JsonProperty(PropertyName = "secrets")] + public IList Secrets { get; set; } + + } +} diff --git a/src/generated/Models/V1ServiceAccountList.cs b/src/generated/Models/V1ServiceAccountList.cs new file mode 100755 index 000000000..81d2289f0 --- /dev/null +++ b/src/generated/Models/V1ServiceAccountList.cs @@ -0,0 +1,105 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ServiceAccountList is a list of ServiceAccount objects + /// + public partial class V1ServiceAccountList + { + /// + /// Initializes a new instance of the V1ServiceAccountList class. + /// + public V1ServiceAccountList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ServiceAccountList class. + /// + /// List of ServiceAccounts. More info: + /// http://releases.k8s.io/HEAD/docs/design/service_accounts.md#service-accounts + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1ServiceAccountList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of ServiceAccounts. More info: + /// http://releases.k8s.io/HEAD/docs/design/service_accounts.md#service-accounts + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + } + } +} diff --git a/src/generated/Models/V1ServiceList.cs b/src/generated/Models/V1ServiceList.cs new file mode 100755 index 000000000..6350163bb --- /dev/null +++ b/src/generated/Models/V1ServiceList.cs @@ -0,0 +1,103 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ServiceList holds a list of services. + /// + public partial class V1ServiceList + { + /// + /// Initializes a new instance of the V1ServiceList class. + /// + public V1ServiceList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ServiceList class. + /// + /// List of services + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1ServiceList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of services + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + } + } +} diff --git a/src/generated/Models/V1ServicePort.cs b/src/generated/Models/V1ServicePort.cs new file mode 100755 index 000000000..c14ca90e9 --- /dev/null +++ b/src/generated/Models/V1ServicePort.cs @@ -0,0 +1,124 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ServicePort contains information on service's port. + /// + public partial class V1ServicePort + { + /// + /// Initializes a new instance of the V1ServicePort class. + /// + public V1ServicePort() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ServicePort class. + /// + /// The port that will be exposed by this + /// service. + /// The name of this port within the service. This + /// must be a DNS_LABEL. All ports within a ServiceSpec must have + /// unique names. This maps to the 'Name' field in EndpointPort + /// objects. Optional if only one ServicePort is defined on this + /// service. + /// The port on each node on which this service + /// is exposed when type=NodePort or LoadBalancer. Usually assigned by + /// the system. If specified, it will be allocated to the service if + /// unused or else creation of the service will fail. Default is to + /// auto-allocate a port if the ServiceType of this Service requires + /// one. More info: + /// http://kubernetes.io/docs/user-guide/services#type--nodeport + /// The IP protocol for this port. Supports + /// "TCP" and "UDP". Default is TCP. + /// Number or name of the port to access on + /// the pods targeted by the service. Number must be in the range 1 to + /// 65535. Name must be an IANA_SVC_NAME. If this is a string, it will + /// be looked up as a named port in the target Pod's container ports. + /// If this is not specified, the value of the 'port' field is used (an + /// identity map). This field is ignored for services with + /// clusterIP=None, and should be omitted or set equal to the 'port' + /// field. More info: + /// http://kubernetes.io/docs/user-guide/services#defining-a-service + public V1ServicePort(int port, string name = default(string), int? nodePort = default(int?), string protocol = default(string), string targetPort = default(string)) + { + Name = name; + NodePort = nodePort; + Port = port; + Protocol = protocol; + TargetPort = targetPort; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of this port within the service. This must be + /// a DNS_LABEL. All ports within a ServiceSpec must have unique names. + /// This maps to the 'Name' field in EndpointPort objects. Optional if + /// only one ServicePort is defined on this service. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the port on each node on which this service is exposed + /// when type=NodePort or LoadBalancer. Usually assigned by the system. + /// If specified, it will be allocated to the service if unused or else + /// creation of the service will fail. Default is to auto-allocate a + /// port if the ServiceType of this Service requires one. More info: + /// http://kubernetes.io/docs/user-guide/services#type--nodeport + /// + [JsonProperty(PropertyName = "nodePort")] + public int? NodePort { get; set; } + + /// + /// Gets or sets the port that will be exposed by this service. + /// + [JsonProperty(PropertyName = "port")] + public int Port { get; set; } + + /// + /// Gets or sets the IP protocol for this port. Supports "TCP" and + /// "UDP". Default is TCP. + /// + [JsonProperty(PropertyName = "protocol")] + public string Protocol { get; set; } + + /// + /// Gets or sets number or name of the port to access on the pods + /// targeted by the service. Number must be in the range 1 to 65535. + /// Name must be an IANA_SVC_NAME. If this is a string, it will be + /// looked up as a named port in the target Pod's container ports. If + /// this is not specified, the value of the 'port' field is used (an + /// identity map). This field is ignored for services with + /// clusterIP=None, and should be omitted or set equal to the 'port' + /// field. More info: + /// http://kubernetes.io/docs/user-guide/services#defining-a-service + /// + [JsonProperty(PropertyName = "targetPort")] + public string TargetPort { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1ServiceSpec.cs b/src/generated/Models/V1ServiceSpec.cs new file mode 100755 index 000000000..130ca0074 --- /dev/null +++ b/src/generated/Models/V1ServiceSpec.cs @@ -0,0 +1,233 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ServiceSpec describes the attributes that a user creates on a service. + /// + public partial class V1ServiceSpec + { + /// + /// Initializes a new instance of the V1ServiceSpec class. + /// + public V1ServiceSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ServiceSpec class. + /// + /// clusterIP is the IP address of the service + /// and is usually assigned randomly by the master. If an address is + /// specified manually and is not in use by others, it will be + /// allocated to the service; otherwise, creation of the service will + /// fail. This field can not be changed through updates. Valid values + /// are "None", empty string (""), or a valid IP address. "None" can be + /// specified for headless services when proxying is not required. Only + /// applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if + /// type is ExternalName. More info: + /// http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + /// deprecatedPublicIPs is deprecated + /// and replaced by the externalIPs field with almost the exact same + /// semantics. This field is retained in the v1 API for compatibility + /// until at least 8/20/2016. It will be removed from any new API + /// revisions. If both deprecatedPublicIPs *and* externalIPs are set, + /// deprecatedPublicIPs is used. + /// externalIPs is a list of IP addresses for + /// which nodes in the cluster will also accept traffic for this + /// service. These IPs are not managed by Kubernetes. The user is + /// responsible for ensuring that traffic arrives at a node with this + /// IP. A common example is external load-balancers that are not part + /// of the Kubernetes system. A previous form of this functionality + /// exists as the deprecatedPublicIPs field. When using this field, + /// callers should also clear the deprecatedPublicIPs field. + /// externalName is the external reference + /// that kubedns or equivalent will return as a CNAME record for this + /// service. No proxying will be involved. Must be a valid DNS name and + /// requires Type to be ExternalName. + /// Only applies to Service Type: + /// LoadBalancer LoadBalancer will get created with the IP specified in + /// this field. This feature depends on whether the underlying + /// cloud-provider supports specifying the loadBalancerIP when a load + /// balancer is created. This field will be ignored if the + /// cloud-provider does not support the feature. + /// If specified and supported + /// by the platform, this will restrict traffic through the + /// cloud-provider load-balancer will be restricted to the specified + /// client IPs. This field will be ignored if the cloud-provider does + /// not support the feature." More info: + /// http://kubernetes.io/docs/user-guide/services-firewalls + /// The list of ports that are exposed by this + /// service. More info: + /// http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + /// Route service traffic to pods with label + /// keys and values matching this selector. If empty or not present, + /// the service is assumed to have an external process managing its + /// endpoints, which Kubernetes will not modify. Only applies to types + /// ClusterIP, NodePort, and LoadBalancer. Ignored if type is + /// ExternalName. More info: + /// http://kubernetes.io/docs/user-guide/services#overview + /// Supports "ClientIP" and "None". Used + /// to maintain session affinity. Enable client IP based session + /// affinity. Must be ClientIP or None. Defaults to None. More info: + /// http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + /// type determines how the Service is exposed. + /// Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, + /// NodePort, and LoadBalancer. "ExternalName" maps to the specified + /// externalName. "ClusterIP" allocates a cluster-internal IP address + /// for load-balancing to endpoints. Endpoints are determined by the + /// selector or if that is not specified, by manual construction of an + /// Endpoints object. If clusterIP is "None", no virtual IP is + /// allocated and the endpoints are published as a set of endpoints + /// rather than a stable IP. "NodePort" builds on ClusterIP and + /// allocates a port on every node which routes to the clusterIP. + /// "LoadBalancer" builds on NodePort and creates an external + /// load-balancer (if supported in the current cloud) which routes to + /// the clusterIP. More info: + /// http://kubernetes.io/docs/user-guide/services#overview + public V1ServiceSpec(string clusterIP = default(string), IList deprecatedPublicIPs = default(IList), IList externalIPs = default(IList), string externalName = default(string), string loadBalancerIP = default(string), IList loadBalancerSourceRanges = default(IList), IList ports = default(IList), IDictionary selector = default(IDictionary), string sessionAffinity = default(string), string type = default(string)) + { + ClusterIP = clusterIP; + DeprecatedPublicIPs = deprecatedPublicIPs; + ExternalIPs = externalIPs; + ExternalName = externalName; + LoadBalancerIP = loadBalancerIP; + LoadBalancerSourceRanges = loadBalancerSourceRanges; + Ports = ports; + Selector = selector; + SessionAffinity = sessionAffinity; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets clusterIP is the IP address of the service and is + /// usually assigned randomly by the master. If an address is specified + /// manually and is not in use by others, it will be allocated to the + /// service; otherwise, creation of the service will fail. This field + /// can not be changed through updates. Valid values are "None", empty + /// string (""), or a valid IP address. "None" can be specified for + /// headless services when proxying is not required. Only applies to + /// types ClusterIP, NodePort, and LoadBalancer. Ignored if type is + /// ExternalName. More info: + /// http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + /// + [JsonProperty(PropertyName = "clusterIP")] + public string ClusterIP { get; set; } + + /// + /// Gets or sets deprecatedPublicIPs is deprecated and replaced by the + /// externalIPs field with almost the exact same semantics. This field + /// is retained in the v1 API for compatibility until at least + /// 8/20/2016. It will be removed from any new API revisions. If both + /// deprecatedPublicIPs *and* externalIPs are set, deprecatedPublicIPs + /// is used. + /// + [JsonProperty(PropertyName = "deprecatedPublicIPs")] + public IList DeprecatedPublicIPs { get; set; } + + /// + /// Gets or sets externalIPs is a list of IP addresses for which nodes + /// in the cluster will also accept traffic for this service. These + /// IPs are not managed by Kubernetes. The user is responsible for + /// ensuring that traffic arrives at a node with this IP. A common + /// example is external load-balancers that are not part of the + /// Kubernetes system. A previous form of this functionality exists as + /// the deprecatedPublicIPs field. When using this field, callers + /// should also clear the deprecatedPublicIPs field. + /// + [JsonProperty(PropertyName = "externalIPs")] + public IList ExternalIPs { get; set; } + + /// + /// Gets or sets externalName is the external reference that kubedns or + /// equivalent will return as a CNAME record for this service. No + /// proxying will be involved. Must be a valid DNS name and requires + /// Type to be ExternalName. + /// + [JsonProperty(PropertyName = "externalName")] + public string ExternalName { get; set; } + + /// + /// Gets or sets only applies to Service Type: LoadBalancer + /// LoadBalancer will get created with the IP specified in this field. + /// This feature depends on whether the underlying cloud-provider + /// supports specifying the loadBalancerIP when a load balancer is + /// created. This field will be ignored if the cloud-provider does not + /// support the feature. + /// + [JsonProperty(PropertyName = "loadBalancerIP")] + public string LoadBalancerIP { get; set; } + + /// + /// Gets or sets if specified and supported by the platform, this will + /// restrict traffic through the cloud-provider load-balancer will be + /// restricted to the specified client IPs. This field will be ignored + /// if the cloud-provider does not support the feature." More info: + /// http://kubernetes.io/docs/user-guide/services-firewalls + /// + [JsonProperty(PropertyName = "loadBalancerSourceRanges")] + public IList LoadBalancerSourceRanges { get; set; } + + /// + /// Gets or sets the list of ports that are exposed by this service. + /// More info: + /// http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + /// + [JsonProperty(PropertyName = "ports")] + public IList Ports { get; set; } + + /// + /// Gets or sets route service traffic to pods with label keys and + /// values matching this selector. If empty or not present, the service + /// is assumed to have an external process managing its endpoints, + /// which Kubernetes will not modify. Only applies to types ClusterIP, + /// NodePort, and LoadBalancer. Ignored if type is ExternalName. More + /// info: http://kubernetes.io/docs/user-guide/services#overview + /// + [JsonProperty(PropertyName = "selector")] + public IDictionary Selector { get; set; } + + /// + /// Gets or sets supports "ClientIP" and "None". Used to maintain + /// session affinity. Enable client IP based session affinity. Must be + /// ClientIP or None. Defaults to None. More info: + /// http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies + /// + [JsonProperty(PropertyName = "sessionAffinity")] + public string SessionAffinity { get; set; } + + /// + /// Gets or sets type determines how the Service is exposed. Defaults + /// to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, + /// and LoadBalancer. "ExternalName" maps to the specified + /// externalName. "ClusterIP" allocates a cluster-internal IP address + /// for load-balancing to endpoints. Endpoints are determined by the + /// selector or if that is not specified, by manual construction of an + /// Endpoints object. If clusterIP is "None", no virtual IP is + /// allocated and the endpoints are published as a set of endpoints + /// rather than a stable IP. "NodePort" builds on ClusterIP and + /// allocates a port on every node which routes to the clusterIP. + /// "LoadBalancer" builds on NodePort and creates an external + /// load-balancer (if supported in the current cloud) which routes to + /// the clusterIP. More info: + /// http://kubernetes.io/docs/user-guide/services#overview + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + } +} diff --git a/src/generated/Models/V1ServiceStatus.cs b/src/generated/Models/V1ServiceStatus.cs new file mode 100755 index 000000000..5216f1867 --- /dev/null +++ b/src/generated/Models/V1ServiceStatus.cs @@ -0,0 +1,47 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ServiceStatus represents the current status of a service. + /// + public partial class V1ServiceStatus + { + /// + /// Initializes a new instance of the V1ServiceStatus class. + /// + public V1ServiceStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1ServiceStatus class. + /// + /// LoadBalancer contains the current status + /// of the load-balancer, if one is present. + public V1ServiceStatus(V1LoadBalancerStatus loadBalancer = default(V1LoadBalancerStatus)) + { + LoadBalancer = loadBalancer; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets loadBalancer contains the current status of the + /// load-balancer, if one is present. + /// + [JsonProperty(PropertyName = "loadBalancer")] + public V1LoadBalancerStatus LoadBalancer { get; set; } + + } +} diff --git a/src/generated/Models/V1Status.cs b/src/generated/Models/V1Status.cs new file mode 100755 index 000000000..c6df4d86e --- /dev/null +++ b/src/generated/Models/V1Status.cs @@ -0,0 +1,139 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Status is a return value for calls that don't return other objects. + /// + public partial class V1Status + { + /// + /// Initializes a new instance of the V1Status class. + /// + public V1Status() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Status class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Suggested HTTP return code for this status, 0 if + /// not set. + /// Extended data associated with the reason. + /// Each reason may define its own extended details. This field is + /// optional and the data returned is not guaranteed to conform to any + /// schema except that defined by the reason type. + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// A human-readable description of the status of + /// this operation. + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// A machine-readable description of why this + /// operation is in the "Failure" status. If this value is empty there + /// is no information available. A Reason clarifies an HTTP status code + /// but does not override it. + /// Status of the operation. One of: "Success" or + /// "Failure". More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1Status(string apiVersion = default(string), int? code = default(int?), V1StatusDetails details = default(V1StatusDetails), string kind = default(string), string message = default(string), V1ListMeta metadata = default(V1ListMeta), string reason = default(string), string status = default(string)) + { + ApiVersion = apiVersion; + Code = code; + Details = details; + Kind = kind; + Message = message; + Metadata = metadata; + Reason = reason; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets suggested HTTP return code for this status, 0 if not + /// set. + /// + [JsonProperty(PropertyName = "code")] + public int? Code { get; set; } + + /// + /// Gets or sets extended data associated with the reason. Each reason + /// may define its own extended details. This field is optional and the + /// data returned is not guaranteed to conform to any schema except + /// that defined by the reason type. + /// + [JsonProperty(PropertyName = "details")] + public V1StatusDetails Details { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets a human-readable description of the status of this + /// operation. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Gets or sets a machine-readable description of why this operation + /// is in the "Failure" status. If this value is empty there is no + /// information available. A Reason clarifies an HTTP status code but + /// does not override it. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets status of the operation. One of: "Success" or + /// "Failure". More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + } +} diff --git a/src/generated/Models/V1StatusCause.cs b/src/generated/Models/V1StatusCause.cs new file mode 100755 index 000000000..50e0f09f4 --- /dev/null +++ b/src/generated/Models/V1StatusCause.cs @@ -0,0 +1,85 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// StatusCause provides more information about an api.Status failure, + /// including cases when multiple errors are encountered. + /// + public partial class V1StatusCause + { + /// + /// Initializes a new instance of the V1StatusCause class. + /// + public V1StatusCause() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1StatusCause class. + /// + /// The field of the resource that has caused this + /// error, as named by its JSON serialization. May include dot and + /// postfix notation for nested attributes. Arrays are zero-indexed. + /// Fields may appear more than once in an array of causes due to + /// fields having multiple errors. Optional. + /// + /// Examples: + /// "name" - the field "name" on the current resource + /// "items[0].name" - the field "name" on the first array entry in + /// "items" + /// A human-readable description of the cause of + /// the error. This field may be presented as-is to a reader. + /// A machine-readable description of the cause of + /// the error. If this value is empty there is no information + /// available. + public V1StatusCause(string field = default(string), string message = default(string), string reason = default(string)) + { + Field = field; + Message = message; + Reason = reason; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the field of the resource that has caused this error, + /// as named by its JSON serialization. May include dot and postfix + /// notation for nested attributes. Arrays are zero-indexed. Fields + /// may appear more than once in an array of causes due to fields + /// having multiple errors. Optional. + /// + /// Examples: + /// "name" - the field "name" on the current resource + /// "items[0].name" - the field "name" on the first array entry in + /// "items" + /// + [JsonProperty(PropertyName = "field")] + public string Field { get; set; } + + /// + /// Gets or sets a human-readable description of the cause of the + /// error. This field may be presented as-is to a reader. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets a machine-readable description of the cause of the + /// error. If this value is empty there is no information available. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + } +} diff --git a/src/generated/Models/V1StatusDetails.cs b/src/generated/Models/V1StatusDetails.cs new file mode 100755 index 000000000..b093f0ec2 --- /dev/null +++ b/src/generated/Models/V1StatusDetails.cs @@ -0,0 +1,102 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// StatusDetails is a set of additional properties that MAY be set by the + /// server to provide additional information about a response. The Reason + /// field of a Status object defines what attributes will be set. Clients + /// must ignore fields that do not match the defined type of each + /// attribute, and should assume that any attribute may be empty, invalid, + /// or under defined. + /// + public partial class V1StatusDetails + { + /// + /// Initializes a new instance of the V1StatusDetails class. + /// + public V1StatusDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1StatusDetails class. + /// + /// The Causes array includes more details + /// associated with the StatusReason failure. Not all StatusReasons may + /// provide detailed causes. + /// The group attribute of the resource associated + /// with the status StatusReason. + /// The kind attribute of the resource associated + /// with the status StatusReason. On some operations may differ from + /// the requested resource Kind. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// The name attribute of the resource associated + /// with the status StatusReason (when there is a single name which can + /// be described). + /// If specified, the time in seconds + /// before the operation should be retried. + public V1StatusDetails(IList causes = default(IList), string group = default(string), string kind = default(string), string name = default(string), int? retryAfterSeconds = default(int?)) + { + Causes = causes; + Group = group; + Kind = kind; + Name = name; + RetryAfterSeconds = retryAfterSeconds; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Causes array includes more details associated with + /// the StatusReason failure. Not all StatusReasons may provide + /// detailed causes. + /// + [JsonProperty(PropertyName = "causes")] + public IList Causes { get; set; } + + /// + /// Gets or sets the group attribute of the resource associated with + /// the status StatusReason. + /// + [JsonProperty(PropertyName = "group")] + public string Group { get; set; } + + /// + /// Gets or sets the kind attribute of the resource associated with the + /// status StatusReason. On some operations may differ from the + /// requested resource Kind. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets the name attribute of the resource associated with the + /// status StatusReason (when there is a single name which can be + /// described). + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets if specified, the time in seconds before the operation + /// should be retried. + /// + [JsonProperty(PropertyName = "retryAfterSeconds")] + public int? RetryAfterSeconds { get; set; } + + } +} diff --git a/src/generated/Models/V1StorageClass.cs b/src/generated/Models/V1StorageClass.cs new file mode 100755 index 000000000..4be414e06 --- /dev/null +++ b/src/generated/Models/V1StorageClass.cs @@ -0,0 +1,119 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// StorageClass describes the parameters for a class of storage for which + /// PersistentVolumes can be dynamically provisioned. + /// + /// StorageClasses are non-namespaced; the name of the storage class + /// according to etcd is in ObjectMeta.Name. + /// + public partial class V1StorageClass + { + /// + /// Initializes a new instance of the V1StorageClass class. + /// + public V1StorageClass() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1StorageClass class. + /// + /// Provisioner indicates the type of the + /// provisioner. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Parameters holds the parameters for the + /// provisioner that should create volumes of this storage + /// class. + public V1StorageClass(string provisioner, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), IDictionary parameters = default(IDictionary)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Parameters = parameters; + Provisioner = provisioner; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets parameters holds the parameters for the provisioner + /// that should create volumes of this storage class. + /// + [JsonProperty(PropertyName = "parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Gets or sets provisioner indicates the type of the provisioner. + /// + [JsonProperty(PropertyName = "provisioner")] + public string Provisioner { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Provisioner == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Provisioner"); + } + } + } +} diff --git a/src/generated/Models/V1StorageClassList.cs b/src/generated/Models/V1StorageClassList.cs new file mode 100755 index 000000000..345dc9251 --- /dev/null +++ b/src/generated/Models/V1StorageClassList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// StorageClassList is a collection of storage classes. + /// + public partial class V1StorageClassList + { + /// + /// Initializes a new instance of the V1StorageClassList class. + /// + public V1StorageClassList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1StorageClassList class. + /// + /// Items is the list of StorageClasses + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1StorageClassList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is the list of StorageClasses + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1SubjectAccessReview.cs b/src/generated/Models/V1SubjectAccessReview.cs new file mode 100755 index 000000000..f9b313ebd --- /dev/null +++ b/src/generated/Models/V1SubjectAccessReview.cs @@ -0,0 +1,114 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SubjectAccessReview checks whether or not a user or group can perform + /// an action. + /// + public partial class V1SubjectAccessReview + { + /// + /// Initializes a new instance of the V1SubjectAccessReview class. + /// + public V1SubjectAccessReview() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1SubjectAccessReview class. + /// + /// Spec holds information about the request being + /// evaluated + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Status is filled in by the server and + /// indicates whether the request is allowed or not + public V1SubjectAccessReview(V1SubjectAccessReviewSpec spec, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1SubjectAccessReviewStatus status = default(V1SubjectAccessReviewStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec holds information about the request being + /// evaluated + /// + [JsonProperty(PropertyName = "spec")] + public V1SubjectAccessReviewSpec Spec { get; set; } + + /// + /// Gets or sets status is filled in by the server and indicates + /// whether the request is allowed or not + /// + [JsonProperty(PropertyName = "status")] + public V1SubjectAccessReviewStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Spec"); + } + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1SubjectAccessReviewSpec.cs b/src/generated/Models/V1SubjectAccessReviewSpec.cs new file mode 100755 index 000000000..fff4fd4a8 --- /dev/null +++ b/src/generated/Models/V1SubjectAccessReviewSpec.cs @@ -0,0 +1,94 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SubjectAccessReviewSpec is a description of the access request. + /// Exactly one of ResourceAuthorizationAttributes and + /// NonResourceAuthorizationAttributes must be set + /// + public partial class V1SubjectAccessReviewSpec + { + /// + /// Initializes a new instance of the V1SubjectAccessReviewSpec class. + /// + public V1SubjectAccessReviewSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1SubjectAccessReviewSpec class. + /// + /// Extra corresponds to the user.Info.GetExtra() + /// method from the authenticator. Since that is input to the + /// authorizer it needs a reflection here. + /// Groups is the groups you're testing + /// for. + /// NonResourceAttributes describes + /// information for a non-resource access request + /// ResourceAuthorizationAttributes + /// describes information for a resource access request + /// User is the user you're testing for. If you + /// specify "User" but not "Groups", then is it interpreted as "What if + /// User were not a member of any groups + public V1SubjectAccessReviewSpec(IDictionary> extra = default(IDictionary>), IList groups = default(IList), V1NonResourceAttributes nonResourceAttributes = default(V1NonResourceAttributes), V1ResourceAttributes resourceAttributes = default(V1ResourceAttributes), string user = default(string)) + { + Extra = extra; + Groups = groups; + NonResourceAttributes = nonResourceAttributes; + ResourceAttributes = resourceAttributes; + User = user; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets extra corresponds to the user.Info.GetExtra() method + /// from the authenticator. Since that is input to the authorizer it + /// needs a reflection here. + /// + [JsonProperty(PropertyName = "extra")] + public IDictionary> Extra { get; set; } + + /// + /// Gets or sets groups is the groups you're testing for. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; set; } + + /// + /// Gets or sets nonResourceAttributes describes information for a + /// non-resource access request + /// + [JsonProperty(PropertyName = "nonResourceAttributes")] + public V1NonResourceAttributes NonResourceAttributes { get; set; } + + /// + /// Gets or sets resourceAuthorizationAttributes describes information + /// for a resource access request + /// + [JsonProperty(PropertyName = "resourceAttributes")] + public V1ResourceAttributes ResourceAttributes { get; set; } + + /// + /// Gets or sets user is the user you're testing for. If you specify + /// "User" but not "Groups", then is it interpreted as "What if User + /// were not a member of any groups + /// + [JsonProperty(PropertyName = "user")] + public string User { get; set; } + + } +} diff --git a/src/generated/Models/V1SubjectAccessReviewStatus.cs b/src/generated/Models/V1SubjectAccessReviewStatus.cs new file mode 100755 index 000000000..ee1f9cfd5 --- /dev/null +++ b/src/generated/Models/V1SubjectAccessReviewStatus.cs @@ -0,0 +1,87 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// SubjectAccessReviewStatus + /// + public partial class V1SubjectAccessReviewStatus + { + /// + /// Initializes a new instance of the V1SubjectAccessReviewStatus + /// class. + /// + public V1SubjectAccessReviewStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1SubjectAccessReviewStatus + /// class. + /// + /// Allowed is required. True if the action + /// would be allowed, false otherwise. + /// EvaluationError is an indication that + /// some error occurred during the authorization check. It is entirely + /// possible to get an error and be able to continue determine + /// authorization status in spite of it. For instance, RBAC can be + /// missing a role, but enough roles are still present and bound to + /// reason about the request. + /// Reason is optional. It indicates why a + /// request was allowed or denied. + public V1SubjectAccessReviewStatus(bool allowed, string evaluationError = default(string), string reason = default(string)) + { + Allowed = allowed; + EvaluationError = evaluationError; + Reason = reason; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets allowed is required. True if the action would be + /// allowed, false otherwise. + /// + [JsonProperty(PropertyName = "allowed")] + public bool Allowed { get; set; } + + /// + /// Gets or sets evaluationError is an indication that some error + /// occurred during the authorization check. It is entirely possible to + /// get an error and be able to continue determine authorization status + /// in spite of it. For instance, RBAC can be missing a role, but + /// enough roles are still present and bound to reason about the + /// request. + /// + [JsonProperty(PropertyName = "evaluationError")] + public string EvaluationError { get; set; } + + /// + /// Gets or sets reason is optional. It indicates why a request was + /// allowed or denied. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1TCPSocketAction.cs b/src/generated/Models/V1TCPSocketAction.cs new file mode 100755 index 000000000..a11f959ef --- /dev/null +++ b/src/generated/Models/V1TCPSocketAction.cs @@ -0,0 +1,63 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// TCPSocketAction describes an action based on opening a socket + /// + public partial class V1TCPSocketAction + { + /// + /// Initializes a new instance of the V1TCPSocketAction class. + /// + public V1TCPSocketAction() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1TCPSocketAction class. + /// + /// Number or name of the port to access on the + /// container. Number must be in the range 1 to 65535. Name must be an + /// IANA_SVC_NAME. + public V1TCPSocketAction(string port) + { + Port = port; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets number or name of the port to access on the container. + /// Number must be in the range 1 to 65535. Name must be an + /// IANA_SVC_NAME. + /// + [JsonProperty(PropertyName = "port")] + public string Port { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Port == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Port"); + } + } + } +} diff --git a/src/generated/Models/V1Taint.cs b/src/generated/Models/V1Taint.cs new file mode 100755 index 000000000..42adac2e5 --- /dev/null +++ b/src/generated/Models/V1Taint.cs @@ -0,0 +1,97 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The node this Taint is attached to has the effect "effect" on any pod + /// that that does not tolerate the Taint. + /// + public partial class V1Taint + { + /// + /// Initializes a new instance of the V1Taint class. + /// + public V1Taint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Taint class. + /// + /// Required. The effect of the taint on pods that + /// do not tolerate the taint. Valid effects are NoSchedule, + /// PreferNoSchedule and NoExecute. + /// Required. The taint key to be applied to a + /// node. + /// TimeAdded represents the time at which the + /// taint was added. It is only written for NoExecute taints. + /// Required. The taint value corresponding to the + /// taint key. + public V1Taint(string effect, string key, System.DateTime? timeAdded = default(System.DateTime?), string value = default(string)) + { + Effect = effect; + Key = key; + TimeAdded = timeAdded; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets required. The effect of the taint on pods that do not + /// tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule + /// and NoExecute. + /// + [JsonProperty(PropertyName = "effect")] + public string Effect { get; set; } + + /// + /// Gets or sets required. The taint key to be applied to a node. + /// + [JsonProperty(PropertyName = "key")] + public string Key { get; set; } + + /// + /// Gets or sets timeAdded represents the time at which the taint was + /// added. It is only written for NoExecute taints. + /// + [JsonProperty(PropertyName = "timeAdded")] + public System.DateTime? TimeAdded { get; set; } + + /// + /// Gets or sets required. The taint value corresponding to the taint + /// key. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Effect == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Effect"); + } + if (Key == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Key"); + } + } + } +} diff --git a/src/generated/Models/V1TokenReview.cs b/src/generated/Models/V1TokenReview.cs new file mode 100755 index 000000000..8d9e892be --- /dev/null +++ b/src/generated/Models/V1TokenReview.cs @@ -0,0 +1,111 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// TokenReview attempts to authenticate a token to a known user. Note: + /// TokenReview requests may be cached by the webhook token authenticator + /// plugin in the kube-apiserver. + /// + public partial class V1TokenReview + { + /// + /// Initializes a new instance of the V1TokenReview class. + /// + public V1TokenReview() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1TokenReview class. + /// + /// Spec holds information about the request being + /// evaluated + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Status is filled in by the server and + /// indicates whether the request can be authenticated. + public V1TokenReview(V1TokenReviewSpec spec, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1TokenReviewStatus status = default(V1TokenReviewStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec holds information about the request being + /// evaluated + /// + [JsonProperty(PropertyName = "spec")] + public V1TokenReviewSpec Spec { get; set; } + + /// + /// Gets or sets status is filled in by the server and indicates + /// whether the request can be authenticated. + /// + [JsonProperty(PropertyName = "status")] + public V1TokenReviewStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Spec"); + } + } + } +} diff --git a/src/generated/Models/V1TokenReviewSpec.cs b/src/generated/Models/V1TokenReviewSpec.cs new file mode 100755 index 000000000..e9bd2cf61 --- /dev/null +++ b/src/generated/Models/V1TokenReviewSpec.cs @@ -0,0 +1,45 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// TokenReviewSpec is a description of the token authentication request. + /// + public partial class V1TokenReviewSpec + { + /// + /// Initializes a new instance of the V1TokenReviewSpec class. + /// + public V1TokenReviewSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1TokenReviewSpec class. + /// + /// Token is the opaque bearer token. + public V1TokenReviewSpec(string token = default(string)) + { + Token = token; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets token is the opaque bearer token. + /// + [JsonProperty(PropertyName = "token")] + public string Token { get; set; } + + } +} diff --git a/src/generated/Models/V1TokenReviewStatus.cs b/src/generated/Models/V1TokenReviewStatus.cs new file mode 100755 index 000000000..472e1a676 --- /dev/null +++ b/src/generated/Models/V1TokenReviewStatus.cs @@ -0,0 +1,66 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// TokenReviewStatus is the result of the token authentication request. + /// + public partial class V1TokenReviewStatus + { + /// + /// Initializes a new instance of the V1TokenReviewStatus class. + /// + public V1TokenReviewStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1TokenReviewStatus class. + /// + /// Authenticated indicates that the token + /// was associated with a known user. + /// Error indicates that the token couldn't be + /// checked + /// User is the UserInfo associated with the + /// provided token. + public V1TokenReviewStatus(bool? authenticated = default(bool?), string error = default(string), V1UserInfo user = default(V1UserInfo)) + { + Authenticated = authenticated; + Error = error; + User = user; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets authenticated indicates that the token was associated + /// with a known user. + /// + [JsonProperty(PropertyName = "authenticated")] + public bool? Authenticated { get; set; } + + /// + /// Gets or sets error indicates that the token couldn't be checked + /// + [JsonProperty(PropertyName = "error")] + public string Error { get; set; } + + /// + /// Gets or sets user is the UserInfo associated with the provided + /// token. + /// + [JsonProperty(PropertyName = "user")] + public V1UserInfo User { get; set; } + + } +} diff --git a/src/generated/Models/V1Toleration.cs b/src/generated/Models/V1Toleration.cs new file mode 100755 index 000000000..1ef5568b9 --- /dev/null +++ b/src/generated/Models/V1Toleration.cs @@ -0,0 +1,109 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The pod this Toleration is attached to tolerates any taint that matches + /// the triple <key,value,effect> using the matching operator + /// <operator>. + /// + public partial class V1Toleration + { + /// + /// Initializes a new instance of the V1Toleration class. + /// + public V1Toleration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Toleration class. + /// + /// Effect indicates the taint effect to match. + /// Empty means match all taint effects. When specified, allowed values + /// are NoSchedule, PreferNoSchedule and NoExecute. + /// Key is the taint key that the toleration applies + /// to. Empty means match all taint keys. If the key is empty, operator + /// must be Exists; this combination means to match all values and all + /// keys. + /// Operator represents a key's + /// relationship to the value. Valid operators are Exists and Equal. + /// Defaults to Equal. Exists is equivalent to wildcard for value, so + /// that a pod can tolerate all taints of a particular + /// category. + /// TolerationSeconds represents the + /// period of time the toleration (which must be of effect NoExecute, + /// otherwise this field is ignored) tolerates the taint. By default, + /// it is not set, which means tolerate the taint forever (do not + /// evict). Zero and negative values will be treated as 0 (evict + /// immediately) by the system. + /// Value is the taint value the toleration matches + /// to. If the operator is Exists, the value should be empty, otherwise + /// just a regular string. + public V1Toleration(string effect = default(string), string key = default(string), string operatorProperty = default(string), long? tolerationSeconds = default(long?), string value = default(string)) + { + Effect = effect; + Key = key; + OperatorProperty = operatorProperty; + TolerationSeconds = tolerationSeconds; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets effect indicates the taint effect to match. Empty + /// means match all taint effects. When specified, allowed values are + /// NoSchedule, PreferNoSchedule and NoExecute. + /// + [JsonProperty(PropertyName = "effect")] + public string Effect { get; set; } + + /// + /// Gets or sets key is the taint key that the toleration applies to. + /// Empty means match all taint keys. If the key is empty, operator + /// must be Exists; this combination means to match all values and all + /// keys. + /// + [JsonProperty(PropertyName = "key")] + public string Key { get; set; } + + /// + /// Gets or sets operator represents a key's relationship to the value. + /// Valid operators are Exists and Equal. Defaults to Equal. Exists is + /// equivalent to wildcard for value, so that a pod can tolerate all + /// taints of a particular category. + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets tolerationSeconds represents the period of time the + /// toleration (which must be of effect NoExecute, otherwise this field + /// is ignored) tolerates the taint. By default, it is not set, which + /// means tolerate the taint forever (do not evict). Zero and negative + /// values will be treated as 0 (evict immediately) by the system. + /// + [JsonProperty(PropertyName = "tolerationSeconds")] + public long? TolerationSeconds { get; set; } + + /// + /// Gets or sets value is the taint value the toleration matches to. If + /// the operator is Exists, the value should be empty, otherwise just a + /// regular string. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + } +} diff --git a/src/generated/Models/V1UserInfo.cs b/src/generated/Models/V1UserInfo.cs new file mode 100755 index 000000000..04a21f51f --- /dev/null +++ b/src/generated/Models/V1UserInfo.cs @@ -0,0 +1,81 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// UserInfo holds the information about the user needed to implement the + /// user.Info interface. + /// + public partial class V1UserInfo + { + /// + /// Initializes a new instance of the V1UserInfo class. + /// + public V1UserInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1UserInfo class. + /// + /// Any additional information provided by the + /// authenticator. + /// The names of groups this user is a part + /// of. + /// A unique value that identifies this user across + /// time. If this user is deleted and another user by the same name is + /// added, they will have different UIDs. + /// The name that uniquely identifies this user + /// among all active users. + public V1UserInfo(IDictionary> extra = default(IDictionary>), IList groups = default(IList), string uid = default(string), string username = default(string)) + { + Extra = extra; + Groups = groups; + Uid = uid; + Username = username; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets any additional information provided by the + /// authenticator. + /// + [JsonProperty(PropertyName = "extra")] + public IDictionary> Extra { get; set; } + + /// + /// Gets or sets the names of groups this user is a part of. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; set; } + + /// + /// Gets or sets a unique value that identifies this user across time. + /// If this user is deleted and another user by the same name is added, + /// they will have different UIDs. + /// + [JsonProperty(PropertyName = "uid")] + public string Uid { get; set; } + + /// + /// Gets or sets the name that uniquely identifies this user among all + /// active users. + /// + [JsonProperty(PropertyName = "username")] + public string Username { get; set; } + + } +} diff --git a/src/generated/Models/V1Volume.cs b/src/generated/Models/V1Volume.cs new file mode 100755 index 000000000..eecd1cd1f --- /dev/null +++ b/src/generated/Models/V1Volume.cs @@ -0,0 +1,451 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Volume represents a named volume in a pod that may be accessed by any + /// container in the pod. + /// + public partial class V1Volume + { + /// + /// Initializes a new instance of the V1Volume class. + /// + public V1Volume() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1Volume class. + /// + /// Volume's name. Must be a DNS_LABEL and unique + /// within the pod. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// AWSElasticBlockStore represents + /// an AWS Disk resource that is attached to a kubelet's host machine + /// and then exposed to the pod. More info: + /// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + /// AzureDisk represents an Azure Data Disk + /// mount on the host and bind mount to the pod. + /// AzureFile represents an Azure File Service + /// mount on the host and bind mount to the pod. + /// CephFS represents a Ceph FS mount on the host + /// that shares a pod's lifetime + /// Cinder represents a cinder volume attached and + /// mounted on kubelets host machine More info: + /// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + /// ConfigMap represents a configMap that + /// should populate this volume + /// DownwardAPI represents downward API about + /// the pod that should populate this volume + /// EmptyDir represents a temporary directory + /// that shares a pod's lifetime. More info: + /// http://kubernetes.io/docs/user-guide/volumes#emptydir + /// FC represents a Fibre Channel resource that is + /// attached to a kubelet's host machine and then exposed to the + /// pod. + /// FlexVolume represents a generic volume + /// resource that is provisioned/attached using an exec based plugin. + /// This is an alpha feature and may change in future. + /// Flocker represents a Flocker volume attached + /// to a kubelet's host machine. This depends on the Flocker control + /// service being running + /// GCEPersistentDisk represents a GCE + /// Disk resource that is attached to a kubelet's host machine and then + /// exposed to the pod. More info: + /// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + /// GitRepo represents a git repository at a + /// particular revision. + /// Glusterfs represents a Glusterfs mount on + /// the host that shares a pod's lifetime. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md + /// HostPath represents a pre-existing file or + /// directory on the host machine that is directly exposed to the + /// container. This is generally used for system agents or other + /// privileged things that are allowed to see the host machine. Most + /// containers will NOT need this. More info: + /// http://kubernetes.io/docs/user-guide/volumes#hostpath + /// ISCSI represents an ISCSI Disk resource that is + /// attached to a kubelet's host machine and then exposed to the pod. + /// More info: + /// http://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md + /// NFS represents an NFS mount on the host that + /// shares a pod's lifetime More info: + /// http://kubernetes.io/docs/user-guide/volumes#nfs + /// PersistentVolumeClaimVolumeSource + /// represents a reference to a PersistentVolumeClaim in the same + /// namespace. More info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + /// PhotonPersistentDisk represents + /// a PhotonController persistent disk attached and mounted on kubelets + /// host machine + /// PortworxVolume represents a portworx + /// volume attached and mounted on kubelets host machine + /// Items for all in one resources secrets, + /// configmaps, and downward API + /// Quobyte represents a Quobyte mount on the + /// host that shares a pod's lifetime + /// RBD represents a Rados Block Device mount on the + /// host that shares a pod's lifetime. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md + /// ScaleIO represents a ScaleIO persistent + /// volume attached and mounted on Kubernetes nodes. + /// Secret represents a secret that should + /// populate this volume. More info: + /// http://kubernetes.io/docs/user-guide/volumes#secrets + /// VsphereVolume represents a vSphere + /// volume attached and mounted on kubelets host machine + public V1Volume(string name, V1AWSElasticBlockStoreVolumeSource awsElasticBlockStore = default(V1AWSElasticBlockStoreVolumeSource), V1AzureDiskVolumeSource azureDisk = default(V1AzureDiskVolumeSource), V1AzureFileVolumeSource azureFile = default(V1AzureFileVolumeSource), V1CephFSVolumeSource cephfs = default(V1CephFSVolumeSource), V1CinderVolumeSource cinder = default(V1CinderVolumeSource), V1ConfigMapVolumeSource configMap = default(V1ConfigMapVolumeSource), V1DownwardAPIVolumeSource downwardAPI = default(V1DownwardAPIVolumeSource), V1EmptyDirVolumeSource emptyDir = default(V1EmptyDirVolumeSource), V1FCVolumeSource fc = default(V1FCVolumeSource), V1FlexVolumeSource flexVolume = default(V1FlexVolumeSource), V1FlockerVolumeSource flocker = default(V1FlockerVolumeSource), V1GCEPersistentDiskVolumeSource gcePersistentDisk = default(V1GCEPersistentDiskVolumeSource), V1GitRepoVolumeSource gitRepo = default(V1GitRepoVolumeSource), V1GlusterfsVolumeSource glusterfs = default(V1GlusterfsVolumeSource), V1HostPathVolumeSource hostPath = default(V1HostPathVolumeSource), V1ISCSIVolumeSource iscsi = default(V1ISCSIVolumeSource), V1NFSVolumeSource nfs = default(V1NFSVolumeSource), V1PersistentVolumeClaimVolumeSource persistentVolumeClaim = default(V1PersistentVolumeClaimVolumeSource), V1PhotonPersistentDiskVolumeSource photonPersistentDisk = default(V1PhotonPersistentDiskVolumeSource), V1PortworxVolumeSource portworxVolume = default(V1PortworxVolumeSource), V1ProjectedVolumeSource projected = default(V1ProjectedVolumeSource), V1QuobyteVolumeSource quobyte = default(V1QuobyteVolumeSource), V1RBDVolumeSource rbd = default(V1RBDVolumeSource), V1ScaleIOVolumeSource scaleIO = default(V1ScaleIOVolumeSource), V1SecretVolumeSource secret = default(V1SecretVolumeSource), V1VsphereVirtualDiskVolumeSource vsphereVolume = default(V1VsphereVirtualDiskVolumeSource)) + { + AwsElasticBlockStore = awsElasticBlockStore; + AzureDisk = azureDisk; + AzureFile = azureFile; + Cephfs = cephfs; + Cinder = cinder; + ConfigMap = configMap; + DownwardAPI = downwardAPI; + EmptyDir = emptyDir; + Fc = fc; + FlexVolume = flexVolume; + Flocker = flocker; + GcePersistentDisk = gcePersistentDisk; + GitRepo = gitRepo; + Glusterfs = glusterfs; + HostPath = hostPath; + Iscsi = iscsi; + Name = name; + Nfs = nfs; + PersistentVolumeClaim = persistentVolumeClaim; + PhotonPersistentDisk = photonPersistentDisk; + PortworxVolume = portworxVolume; + Projected = projected; + Quobyte = quobyte; + Rbd = rbd; + ScaleIO = scaleIO; + Secret = secret; + VsphereVolume = vsphereVolume; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aWSElasticBlockStore represents an AWS Disk resource + /// that is attached to a kubelet's host machine and then exposed to + /// the pod. More info: + /// http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore + /// + [JsonProperty(PropertyName = "awsElasticBlockStore")] + public V1AWSElasticBlockStoreVolumeSource AwsElasticBlockStore { get; set; } + + /// + /// Gets or sets azureDisk represents an Azure Data Disk mount on the + /// host and bind mount to the pod. + /// + [JsonProperty(PropertyName = "azureDisk")] + public V1AzureDiskVolumeSource AzureDisk { get; set; } + + /// + /// Gets or sets azureFile represents an Azure File Service mount on + /// the host and bind mount to the pod. + /// + [JsonProperty(PropertyName = "azureFile")] + public V1AzureFileVolumeSource AzureFile { get; set; } + + /// + /// Gets or sets cephFS represents a Ceph FS mount on the host that + /// shares a pod's lifetime + /// + [JsonProperty(PropertyName = "cephfs")] + public V1CephFSVolumeSource Cephfs { get; set; } + + /// + /// Gets or sets cinder represents a cinder volume attached and mounted + /// on kubelets host machine More info: + /// http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + /// + [JsonProperty(PropertyName = "cinder")] + public V1CinderVolumeSource Cinder { get; set; } + + /// + /// Gets or sets configMap represents a configMap that should populate + /// this volume + /// + [JsonProperty(PropertyName = "configMap")] + public V1ConfigMapVolumeSource ConfigMap { get; set; } + + /// + /// Gets or sets downwardAPI represents downward API about the pod that + /// should populate this volume + /// + [JsonProperty(PropertyName = "downwardAPI")] + public V1DownwardAPIVolumeSource DownwardAPI { get; set; } + + /// + /// Gets or sets emptyDir represents a temporary directory that shares + /// a pod's lifetime. More info: + /// http://kubernetes.io/docs/user-guide/volumes#emptydir + /// + [JsonProperty(PropertyName = "emptyDir")] + public V1EmptyDirVolumeSource EmptyDir { get; set; } + + /// + /// Gets or sets FC represents a Fibre Channel resource that is + /// attached to a kubelet's host machine and then exposed to the pod. + /// + [JsonProperty(PropertyName = "fc")] + public V1FCVolumeSource Fc { get; set; } + + /// + /// Gets or sets flexVolume represents a generic volume resource that + /// is provisioned/attached using an exec based plugin. This is an + /// alpha feature and may change in future. + /// + [JsonProperty(PropertyName = "flexVolume")] + public V1FlexVolumeSource FlexVolume { get; set; } + + /// + /// Gets or sets flocker represents a Flocker volume attached to a + /// kubelet's host machine. This depends on the Flocker control service + /// being running + /// + [JsonProperty(PropertyName = "flocker")] + public V1FlockerVolumeSource Flocker { get; set; } + + /// + /// Gets or sets gCEPersistentDisk represents a GCE Disk resource that + /// is attached to a kubelet's host machine and then exposed to the + /// pod. More info: + /// http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk + /// + [JsonProperty(PropertyName = "gcePersistentDisk")] + public V1GCEPersistentDiskVolumeSource GcePersistentDisk { get; set; } + + /// + /// Gets or sets gitRepo represents a git repository at a particular + /// revision. + /// + [JsonProperty(PropertyName = "gitRepo")] + public V1GitRepoVolumeSource GitRepo { get; set; } + + /// + /// Gets or sets glusterfs represents a Glusterfs mount on the host + /// that shares a pod's lifetime. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md + /// + [JsonProperty(PropertyName = "glusterfs")] + public V1GlusterfsVolumeSource Glusterfs { get; set; } + + /// + /// Gets or sets hostPath represents a pre-existing file or directory + /// on the host machine that is directly exposed to the container. This + /// is generally used for system agents or other privileged things that + /// are allowed to see the host machine. Most containers will NOT need + /// this. More info: + /// http://kubernetes.io/docs/user-guide/volumes#hostpath + /// + [JsonProperty(PropertyName = "hostPath")] + public V1HostPathVolumeSource HostPath { get; set; } + + /// + /// Gets or sets ISCSI represents an ISCSI Disk resource that is + /// attached to a kubelet's host machine and then exposed to the pod. + /// More info: + /// http://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md + /// + [JsonProperty(PropertyName = "iscsi")] + public V1ISCSIVolumeSource Iscsi { get; set; } + + /// + /// Gets or sets volume's name. Must be a DNS_LABEL and unique within + /// the pod. More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets NFS represents an NFS mount on the host that shares a + /// pod's lifetime More info: + /// http://kubernetes.io/docs/user-guide/volumes#nfs + /// + [JsonProperty(PropertyName = "nfs")] + public V1NFSVolumeSource Nfs { get; set; } + + /// + /// Gets or sets persistentVolumeClaimVolumeSource represents a + /// reference to a PersistentVolumeClaim in the same namespace. More + /// info: + /// http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims + /// + [JsonProperty(PropertyName = "persistentVolumeClaim")] + public V1PersistentVolumeClaimVolumeSource PersistentVolumeClaim { get; set; } + + /// + /// Gets or sets photonPersistentDisk represents a PhotonController + /// persistent disk attached and mounted on kubelets host machine + /// + [JsonProperty(PropertyName = "photonPersistentDisk")] + public V1PhotonPersistentDiskVolumeSource PhotonPersistentDisk { get; set; } + + /// + /// Gets or sets portworxVolume represents a portworx volume attached + /// and mounted on kubelets host machine + /// + [JsonProperty(PropertyName = "portworxVolume")] + public V1PortworxVolumeSource PortworxVolume { get; set; } + + /// + /// Gets or sets items for all in one resources secrets, configmaps, + /// and downward API + /// + [JsonProperty(PropertyName = "projected")] + public V1ProjectedVolumeSource Projected { get; set; } + + /// + /// Gets or sets quobyte represents a Quobyte mount on the host that + /// shares a pod's lifetime + /// + [JsonProperty(PropertyName = "quobyte")] + public V1QuobyteVolumeSource Quobyte { get; set; } + + /// + /// Gets or sets RBD represents a Rados Block Device mount on the host + /// that shares a pod's lifetime. More info: + /// http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md + /// + [JsonProperty(PropertyName = "rbd")] + public V1RBDVolumeSource Rbd { get; set; } + + /// + /// Gets or sets scaleIO represents a ScaleIO persistent volume + /// attached and mounted on Kubernetes nodes. + /// + [JsonProperty(PropertyName = "scaleIO")] + public V1ScaleIOVolumeSource ScaleIO { get; set; } + + /// + /// Gets or sets secret represents a secret that should populate this + /// volume. More info: + /// http://kubernetes.io/docs/user-guide/volumes#secrets + /// + [JsonProperty(PropertyName = "secret")] + public V1SecretVolumeSource Secret { get; set; } + + /// + /// Gets or sets vsphereVolume represents a vSphere volume attached and + /// mounted on kubelets host machine + /// + [JsonProperty(PropertyName = "vsphereVolume")] + public V1VsphereVirtualDiskVolumeSource VsphereVolume { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (AwsElasticBlockStore != null) + { + AwsElasticBlockStore.Validate(); + } + if (AzureDisk != null) + { + AzureDisk.Validate(); + } + if (AzureFile != null) + { + AzureFile.Validate(); + } + if (Cephfs != null) + { + Cephfs.Validate(); + } + if (Cinder != null) + { + Cinder.Validate(); + } + if (Fc != null) + { + Fc.Validate(); + } + if (FlexVolume != null) + { + FlexVolume.Validate(); + } + if (GcePersistentDisk != null) + { + GcePersistentDisk.Validate(); + } + if (GitRepo != null) + { + GitRepo.Validate(); + } + if (Glusterfs != null) + { + Glusterfs.Validate(); + } + if (HostPath != null) + { + HostPath.Validate(); + } + if (Iscsi != null) + { + Iscsi.Validate(); + } + if (Nfs != null) + { + Nfs.Validate(); + } + if (PersistentVolumeClaim != null) + { + PersistentVolumeClaim.Validate(); + } + if (PhotonPersistentDisk != null) + { + PhotonPersistentDisk.Validate(); + } + if (PortworxVolume != null) + { + PortworxVolume.Validate(); + } + if (Projected != null) + { + Projected.Validate(); + } + if (Quobyte != null) + { + Quobyte.Validate(); + } + if (Rbd != null) + { + Rbd.Validate(); + } + if (ScaleIO != null) + { + ScaleIO.Validate(); + } + if (VsphereVolume != null) + { + VsphereVolume.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1VolumeMount.cs b/src/generated/Models/V1VolumeMount.cs new file mode 100755 index 000000000..2625fc34f --- /dev/null +++ b/src/generated/Models/V1VolumeMount.cs @@ -0,0 +1,95 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// VolumeMount describes a mounting of a Volume within a container. + /// + public partial class V1VolumeMount + { + /// + /// Initializes a new instance of the V1VolumeMount class. + /// + public V1VolumeMount() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1VolumeMount class. + /// + /// Path within the container at which the + /// volume should be mounted. Must not contain ':'. + /// This must match the Name of a Volume. + /// Mounted read-only if true, + /// read-write otherwise (false or unspecified). Defaults to + /// false. + /// Path within the volume from which the + /// container's volume should be mounted. Defaults to "" (volume's + /// root). + public V1VolumeMount(string mountPath, string name, bool? readOnlyProperty = default(bool?), string subPath = default(string)) + { + MountPath = mountPath; + Name = name; + ReadOnlyProperty = readOnlyProperty; + SubPath = subPath; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets path within the container at which the volume should + /// be mounted. Must not contain ':'. + /// + [JsonProperty(PropertyName = "mountPath")] + public string MountPath { get; set; } + + /// + /// Gets or sets this must match the Name of a Volume. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets mounted read-only if true, read-write otherwise (false + /// or unspecified). Defaults to false. + /// + [JsonProperty(PropertyName = "readOnly")] + public bool? ReadOnlyProperty { get; set; } + + /// + /// Gets or sets path within the volume from which the container's + /// volume should be mounted. Defaults to "" (volume's root). + /// + [JsonProperty(PropertyName = "subPath")] + public string SubPath { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (MountPath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MountPath"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/src/generated/Models/V1VolumeProjection.cs b/src/generated/Models/V1VolumeProjection.cs new file mode 100755 index 000000000..15cb98960 --- /dev/null +++ b/src/generated/Models/V1VolumeProjection.cs @@ -0,0 +1,65 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Projection that may be projected along with other supported volume + /// types + /// + public partial class V1VolumeProjection + { + /// + /// Initializes a new instance of the V1VolumeProjection class. + /// + public V1VolumeProjection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1VolumeProjection class. + /// + /// information about the configMap data to + /// project + /// information about the downwardAPI data to + /// project + /// information about the secret data to + /// project + public V1VolumeProjection(V1ConfigMapProjection configMap = default(V1ConfigMapProjection), V1DownwardAPIProjection downwardAPI = default(V1DownwardAPIProjection), V1SecretProjection secret = default(V1SecretProjection)) + { + ConfigMap = configMap; + DownwardAPI = downwardAPI; + Secret = secret; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets information about the configMap data to project + /// + [JsonProperty(PropertyName = "configMap")] + public V1ConfigMapProjection ConfigMap { get; set; } + + /// + /// Gets or sets information about the downwardAPI data to project + /// + [JsonProperty(PropertyName = "downwardAPI")] + public V1DownwardAPIProjection DownwardAPI { get; set; } + + /// + /// Gets or sets information about the secret data to project + /// + [JsonProperty(PropertyName = "secret")] + public V1SecretProjection Secret { get; set; } + + } +} diff --git a/src/generated/Models/V1VsphereVirtualDiskVolumeSource.cs b/src/generated/Models/V1VsphereVirtualDiskVolumeSource.cs new file mode 100755 index 000000000..70f04a302 --- /dev/null +++ b/src/generated/Models/V1VsphereVirtualDiskVolumeSource.cs @@ -0,0 +1,74 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Represents a vSphere volume resource. + /// + public partial class V1VsphereVirtualDiskVolumeSource + { + /// + /// Initializes a new instance of the V1VsphereVirtualDiskVolumeSource + /// class. + /// + public V1VsphereVirtualDiskVolumeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1VsphereVirtualDiskVolumeSource + /// class. + /// + /// Path that identifies vSphere volume + /// vmdk + /// Filesystem type to mount. Must be a filesystem + /// type supported by the host operating system. Ex. "ext4", "xfs", + /// "ntfs". Implicitly inferred to be "ext4" if unspecified. + public V1VsphereVirtualDiskVolumeSource(string volumePath, string fsType = default(string)) + { + FsType = fsType; + VolumePath = volumePath; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets filesystem type to mount. Must be a filesystem type + /// supported by the host operating system. Ex. "ext4", "xfs", "ntfs". + /// Implicitly inferred to be "ext4" if unspecified. + /// + [JsonProperty(PropertyName = "fsType")] + public string FsType { get; set; } + + /// + /// Gets or sets path that identifies vSphere volume vmdk + /// + [JsonProperty(PropertyName = "volumePath")] + public string VolumePath { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (VolumePath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "VolumePath"); + } + } + } +} diff --git a/src/generated/Models/V1WatchEvent.cs b/src/generated/Models/V1WatchEvent.cs new file mode 100755 index 000000000..a04e8fd49 --- /dev/null +++ b/src/generated/Models/V1WatchEvent.cs @@ -0,0 +1,85 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Event represents a single event to a watched resource. + /// + public partial class V1WatchEvent + { + /// + /// Initializes a new instance of the V1WatchEvent class. + /// + public V1WatchEvent() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1WatchEvent class. + /// + /// Object is: + /// * If Type is Added or Modified: the new state of the object. + /// * If Type is Deleted: the state of the object immediately before + /// deletion. + /// * If Type is Error: *Status is recommended; other types may make + /// sense + /// depending on context. + public V1WatchEvent(RuntimeRawExtension objectProperty, string type) + { + ObjectProperty = objectProperty; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets object is: + /// * If Type is Added or Modified: the new state of the object. + /// * If Type is Deleted: the state of the object immediately before + /// deletion. + /// * If Type is Error: *Status is recommended; other types may make + /// sense + /// depending on context. + /// + [JsonProperty(PropertyName = "object")] + public RuntimeRawExtension ObjectProperty { get; set; } + + /// + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ObjectProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ObjectProperty"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + if (ObjectProperty != null) + { + ObjectProperty.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1WeightedPodAffinityTerm.cs b/src/generated/Models/V1WeightedPodAffinityTerm.cs new file mode 100755 index 000000000..5cc3c69d5 --- /dev/null +++ b/src/generated/Models/V1WeightedPodAffinityTerm.cs @@ -0,0 +1,72 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The weights of all of the matched WeightedPodAffinityTerm fields are + /// added per-node to find the most preferred node(s) + /// + public partial class V1WeightedPodAffinityTerm + { + /// + /// Initializes a new instance of the V1WeightedPodAffinityTerm class. + /// + public V1WeightedPodAffinityTerm() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1WeightedPodAffinityTerm class. + /// + /// Required. A pod affinity term, + /// associated with the corresponding weight. + /// weight associated with matching the + /// corresponding podAffinityTerm, in the range 1-100. + public V1WeightedPodAffinityTerm(V1PodAffinityTerm podAffinityTerm, int weight) + { + PodAffinityTerm = podAffinityTerm; + Weight = weight; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets required. A pod affinity term, associated with the + /// corresponding weight. + /// + [JsonProperty(PropertyName = "podAffinityTerm")] + public V1PodAffinityTerm PodAffinityTerm { get; set; } + + /// + /// Gets or sets weight associated with matching the corresponding + /// podAffinityTerm, in the range 1-100. + /// + [JsonProperty(PropertyName = "weight")] + public int Weight { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PodAffinityTerm == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PodAffinityTerm"); + } + } + } +} diff --git a/src/generated/Models/V1alpha1ClusterRole.cs b/src/generated/Models/V1alpha1ClusterRole.cs new file mode 100755 index 000000000..098347178 --- /dev/null +++ b/src/generated/Models/V1alpha1ClusterRole.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ClusterRole is a cluster level, logical grouping of PolicyRules that + /// can be referenced as a unit by a RoleBinding or ClusterRoleBinding. + /// + public partial class V1alpha1ClusterRole + { + /// + /// Initializes a new instance of the V1alpha1ClusterRole class. + /// + public V1alpha1ClusterRole() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1ClusterRole class. + /// + /// Rules holds all the PolicyRules for this + /// ClusterRole + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1alpha1ClusterRole(IList rules, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Rules = rules; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets rules holds all the PolicyRules for this ClusterRole + /// + [JsonProperty(PropertyName = "rules")] + public IList Rules { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Rules == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Rules"); + } + if (Rules != null) + { + foreach (var element in Rules) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1alpha1ClusterRoleBinding.cs b/src/generated/Models/V1alpha1ClusterRoleBinding.cs new file mode 100755 index 000000000..b16b92126 --- /dev/null +++ b/src/generated/Models/V1alpha1ClusterRoleBinding.cs @@ -0,0 +1,135 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ClusterRoleBinding references a ClusterRole, but not contain it. It + /// can reference a ClusterRole in the global namespace, and adds who + /// information via Subject. + /// + public partial class V1alpha1ClusterRoleBinding + { + /// + /// Initializes a new instance of the V1alpha1ClusterRoleBinding class. + /// + public V1alpha1ClusterRoleBinding() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1ClusterRoleBinding class. + /// + /// RoleRef can only reference a ClusterRole in + /// the global namespace. If the RoleRef cannot be resolved, the + /// Authorizer must return an error. + /// Subjects holds references to the objects the + /// role applies to. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1alpha1ClusterRoleBinding(V1alpha1RoleRef roleRef, IList subjects, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + RoleRef = roleRef; + Subjects = subjects; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets roleRef can only reference a ClusterRole in the global + /// namespace. If the RoleRef cannot be resolved, the Authorizer must + /// return an error. + /// + [JsonProperty(PropertyName = "roleRef")] + public V1alpha1RoleRef RoleRef { get; set; } + + /// + /// Gets or sets subjects holds references to the objects the role + /// applies to. + /// + [JsonProperty(PropertyName = "subjects")] + public IList Subjects { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (RoleRef == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RoleRef"); + } + if (Subjects == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Subjects"); + } + if (RoleRef != null) + { + RoleRef.Validate(); + } + if (Subjects != null) + { + foreach (var element in Subjects) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1alpha1ClusterRoleBindingList.cs b/src/generated/Models/V1alpha1ClusterRoleBindingList.cs new file mode 100755 index 000000000..66ff0892d --- /dev/null +++ b/src/generated/Models/V1alpha1ClusterRoleBindingList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ClusterRoleBindingList is a collection of ClusterRoleBindings + /// + public partial class V1alpha1ClusterRoleBindingList + { + /// + /// Initializes a new instance of the V1alpha1ClusterRoleBindingList + /// class. + /// + public V1alpha1ClusterRoleBindingList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1ClusterRoleBindingList + /// class. + /// + /// Items is a list of ClusterRoleBindings + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1alpha1ClusterRoleBindingList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of ClusterRoleBindings + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1alpha1ClusterRoleList.cs b/src/generated/Models/V1alpha1ClusterRoleList.cs new file mode 100755 index 000000000..939bc66f3 --- /dev/null +++ b/src/generated/Models/V1alpha1ClusterRoleList.cs @@ -0,0 +1,111 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ClusterRoleList is a collection of ClusterRoles + /// + public partial class V1alpha1ClusterRoleList + { + /// + /// Initializes a new instance of the V1alpha1ClusterRoleList class. + /// + public V1alpha1ClusterRoleList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1ClusterRoleList class. + /// + /// Items is a list of ClusterRoles + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1alpha1ClusterRoleList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of ClusterRoles + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1alpha1PodPreset.cs b/src/generated/Models/V1alpha1PodPreset.cs new file mode 100755 index 000000000..0f3a16e01 --- /dev/null +++ b/src/generated/Models/V1alpha1PodPreset.cs @@ -0,0 +1,82 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// PodPreset is a policy resource that defines additional runtime + /// requirements for a Pod. + /// + public partial class V1alpha1PodPreset + { + /// + /// Initializes a new instance of the V1alpha1PodPreset class. + /// + public V1alpha1PodPreset() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1PodPreset class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1alpha1PodPreset(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1alpha1PodPresetSpec spec = default(V1alpha1PodPresetSpec)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// + [JsonProperty(PropertyName = "spec")] + public V1alpha1PodPresetSpec Spec { get; set; } + + } +} diff --git a/src/generated/Models/V1alpha1PodPresetList.cs b/src/generated/Models/V1alpha1PodPresetList.cs new file mode 100755 index 000000000..7eaf47683 --- /dev/null +++ b/src/generated/Models/V1alpha1PodPresetList.cs @@ -0,0 +1,103 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PodPresetList is a list of PodPreset objects. + /// + public partial class V1alpha1PodPresetList + { + /// + /// Initializes a new instance of the V1alpha1PodPresetList class. + /// + public V1alpha1PodPresetList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1PodPresetList class. + /// + /// Items is a list of schema objects. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1alpha1PodPresetList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of schema objects. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + } + } +} diff --git a/src/generated/Models/V1alpha1PodPresetSpec.cs b/src/generated/Models/V1alpha1PodPresetSpec.cs new file mode 100755 index 000000000..de2ed5903 --- /dev/null +++ b/src/generated/Models/V1alpha1PodPresetSpec.cs @@ -0,0 +1,89 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PodPresetSpec is a description of a pod injection policy. + /// + public partial class V1alpha1PodPresetSpec + { + /// + /// Initializes a new instance of the V1alpha1PodPresetSpec class. + /// + public V1alpha1PodPresetSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1PodPresetSpec class. + /// + /// Env defines the collection of EnvVar to inject + /// into containers. + /// EnvFrom defines the collection of + /// EnvFromSource to inject into containers. + /// Selector is a label query over a set of + /// resources, in this case pods. Required. + /// VolumeMounts defines the collection of + /// VolumeMount to inject into containers. + /// Volumes defines the collection of Volume to + /// inject into the pod. + public V1alpha1PodPresetSpec(IList env = default(IList), IList envFrom = default(IList), V1LabelSelector selector = default(V1LabelSelector), IList volumeMounts = default(IList), IList volumes = default(IList)) + { + Env = env; + EnvFrom = envFrom; + Selector = selector; + VolumeMounts = volumeMounts; + Volumes = volumes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets env defines the collection of EnvVar to inject into + /// containers. + /// + [JsonProperty(PropertyName = "env")] + public IList Env { get; set; } + + /// + /// Gets or sets envFrom defines the collection of EnvFromSource to + /// inject into containers. + /// + [JsonProperty(PropertyName = "envFrom")] + public IList EnvFrom { get; set; } + + /// + /// Gets or sets selector is a label query over a set of resources, in + /// this case pods. Required. + /// + [JsonProperty(PropertyName = "selector")] + public V1LabelSelector Selector { get; set; } + + /// + /// Gets or sets volumeMounts defines the collection of VolumeMount to + /// inject into containers. + /// + [JsonProperty(PropertyName = "volumeMounts")] + public IList VolumeMounts { get; set; } + + /// + /// Gets or sets volumes defines the collection of Volume to inject + /// into the pod. + /// + [JsonProperty(PropertyName = "volumes")] + public IList Volumes { get; set; } + + } +} diff --git a/src/generated/Models/V1alpha1PolicyRule.cs b/src/generated/Models/V1alpha1PolicyRule.cs new file mode 100755 index 000000000..bbb451ae8 --- /dev/null +++ b/src/generated/Models/V1alpha1PolicyRule.cs @@ -0,0 +1,127 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PolicyRule holds information that describes a policy rule, but does not + /// contain information about who the rule applies to or which namespace + /// the rule applies to. + /// + public partial class V1alpha1PolicyRule + { + /// + /// Initializes a new instance of the V1alpha1PolicyRule class. + /// + public V1alpha1PolicyRule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1PolicyRule class. + /// + /// Verbs is a list of Verbs that apply to ALL the + /// ResourceKinds and AttributeRestrictions contained in this rule. + /// VerbAll represents all kinds. + /// APIGroups is the name of the APIGroup that + /// contains the resources. If multiple API groups are specified, any + /// action requested against one of the enumerated resources in any API + /// group will be allowed. + /// NonResourceURLs is a set of partial + /// urls that a user should have access to. *s are allowed, but only + /// as the full, final step in the path This name is intentionally + /// different than the internal type so that the DefaultConvert works + /// nicely and because the ordering may be different. Since + /// non-resource URLs are not namespaced, this field is only applicable + /// for ClusterRoles referenced from a ClusterRoleBinding. Rules can + /// either apply to API resources (such as "pods" or "secrets") or + /// non-resource URL paths (such as "/api"), but not both. + /// ResourceNames is an optional white list + /// of names that the rule applies to. An empty set means that + /// everything is allowed. + /// Resources is a list of resources this rule + /// applies to. ResourceAll represents all resources. + public V1alpha1PolicyRule(IList verbs, IList apiGroups = default(IList), IList nonResourceURLs = default(IList), IList resourceNames = default(IList), IList resources = default(IList)) + { + ApiGroups = apiGroups; + NonResourceURLs = nonResourceURLs; + ResourceNames = resourceNames; + Resources = resources; + Verbs = verbs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIGroups is the name of the APIGroup that contains + /// the resources. If multiple API groups are specified, any action + /// requested against one of the enumerated resources in any API group + /// will be allowed. + /// + [JsonProperty(PropertyName = "apiGroups")] + public IList ApiGroups { get; set; } + + /// + /// Gets or sets nonResourceURLs is a set of partial urls that a user + /// should have access to. *s are allowed, but only as the full, final + /// step in the path This name is intentionally different than the + /// internal type so that the DefaultConvert works nicely and because + /// the ordering may be different. Since non-resource URLs are not + /// namespaced, this field is only applicable for ClusterRoles + /// referenced from a ClusterRoleBinding. Rules can either apply to API + /// resources (such as "pods" or "secrets") or non-resource URL paths + /// (such as "/api"), but not both. + /// + [JsonProperty(PropertyName = "nonResourceURLs")] + public IList NonResourceURLs { get; set; } + + /// + /// Gets or sets resourceNames is an optional white list of names that + /// the rule applies to. An empty set means that everything is + /// allowed. + /// + [JsonProperty(PropertyName = "resourceNames")] + public IList ResourceNames { get; set; } + + /// + /// Gets or sets resources is a list of resources this rule applies to. + /// ResourceAll represents all resources. + /// + [JsonProperty(PropertyName = "resources")] + public IList Resources { get; set; } + + /// + /// Gets or sets verbs is a list of Verbs that apply to ALL the + /// ResourceKinds and AttributeRestrictions contained in this rule. + /// VerbAll represents all kinds. + /// + [JsonProperty(PropertyName = "verbs")] + public IList Verbs { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Verbs == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Verbs"); + } + } + } +} diff --git a/src/generated/Models/V1alpha1Role.cs b/src/generated/Models/V1alpha1Role.cs new file mode 100755 index 000000000..c3636d92f --- /dev/null +++ b/src/generated/Models/V1alpha1Role.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Role is a namespaced, logical grouping of PolicyRules that can be + /// referenced as a unit by a RoleBinding. + /// + public partial class V1alpha1Role + { + /// + /// Initializes a new instance of the V1alpha1Role class. + /// + public V1alpha1Role() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1Role class. + /// + /// Rules holds all the PolicyRules for this + /// Role + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1alpha1Role(IList rules, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Rules = rules; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets rules holds all the PolicyRules for this Role + /// + [JsonProperty(PropertyName = "rules")] + public IList Rules { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Rules == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Rules"); + } + if (Rules != null) + { + foreach (var element in Rules) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1alpha1RoleBinding.cs b/src/generated/Models/V1alpha1RoleBinding.cs new file mode 100755 index 000000000..9dbf711de --- /dev/null +++ b/src/generated/Models/V1alpha1RoleBinding.cs @@ -0,0 +1,137 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// RoleBinding references a role, but does not contain it. It can + /// reference a Role in the same namespace or a ClusterRole in the global + /// namespace. It adds who information via Subjects and namespace + /// information by which namespace it exists in. RoleBindings in a given + /// namespace only have effect in that namespace. + /// + public partial class V1alpha1RoleBinding + { + /// + /// Initializes a new instance of the V1alpha1RoleBinding class. + /// + public V1alpha1RoleBinding() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1RoleBinding class. + /// + /// RoleRef can reference a Role in the current + /// namespace or a ClusterRole in the global namespace. If the RoleRef + /// cannot be resolved, the Authorizer must return an error. + /// Subjects holds references to the objects the + /// role applies to. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1alpha1RoleBinding(V1alpha1RoleRef roleRef, IList subjects, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + RoleRef = roleRef; + Subjects = subjects; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets roleRef can reference a Role in the current namespace + /// or a ClusterRole in the global namespace. If the RoleRef cannot be + /// resolved, the Authorizer must return an error. + /// + [JsonProperty(PropertyName = "roleRef")] + public V1alpha1RoleRef RoleRef { get; set; } + + /// + /// Gets or sets subjects holds references to the objects the role + /// applies to. + /// + [JsonProperty(PropertyName = "subjects")] + public IList Subjects { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (RoleRef == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RoleRef"); + } + if (Subjects == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Subjects"); + } + if (RoleRef != null) + { + RoleRef.Validate(); + } + if (Subjects != null) + { + foreach (var element in Subjects) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1alpha1RoleBindingList.cs b/src/generated/Models/V1alpha1RoleBindingList.cs new file mode 100755 index 000000000..7f9a36a09 --- /dev/null +++ b/src/generated/Models/V1alpha1RoleBindingList.cs @@ -0,0 +1,111 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// RoleBindingList is a collection of RoleBindings + /// + public partial class V1alpha1RoleBindingList + { + /// + /// Initializes a new instance of the V1alpha1RoleBindingList class. + /// + public V1alpha1RoleBindingList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1RoleBindingList class. + /// + /// Items is a list of RoleBindings + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1alpha1RoleBindingList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of RoleBindings + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1alpha1RoleList.cs b/src/generated/Models/V1alpha1RoleList.cs new file mode 100755 index 000000000..558d8cd7a --- /dev/null +++ b/src/generated/Models/V1alpha1RoleList.cs @@ -0,0 +1,111 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// RoleList is a collection of Roles + /// + public partial class V1alpha1RoleList + { + /// + /// Initializes a new instance of the V1alpha1RoleList class. + /// + public V1alpha1RoleList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1RoleList class. + /// + /// Items is a list of Roles + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1alpha1RoleList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of Roles + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1alpha1RoleRef.cs b/src/generated/Models/V1alpha1RoleRef.cs new file mode 100755 index 000000000..47c36e4e6 --- /dev/null +++ b/src/generated/Models/V1alpha1RoleRef.cs @@ -0,0 +1,87 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// RoleRef contains information that points to the role being used + /// + public partial class V1alpha1RoleRef + { + /// + /// Initializes a new instance of the V1alpha1RoleRef class. + /// + public V1alpha1RoleRef() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1RoleRef class. + /// + /// APIGroup is the group for the resource being + /// referenced + /// Kind is the type of resource being + /// referenced + /// Name is the name of resource being + /// referenced + public V1alpha1RoleRef(string apiGroup, string kind, string name) + { + ApiGroup = apiGroup; + Kind = kind; + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIGroup is the group for the resource being + /// referenced + /// + [JsonProperty(PropertyName = "apiGroup")] + public string ApiGroup { get; set; } + + /// + /// Gets or sets kind is the type of resource being referenced + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets name is the name of resource being referenced + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ApiGroup == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ApiGroup"); + } + if (Kind == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/src/generated/Models/V1alpha1Subject.cs b/src/generated/Models/V1alpha1Subject.cs new file mode 100755 index 000000000..889f528af --- /dev/null +++ b/src/generated/Models/V1alpha1Subject.cs @@ -0,0 +1,106 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Subject contains a reference to the object or user identities a role + /// binding applies to. This can either hold a direct API object + /// reference, or a value for non-objects such as user and group names. + /// + public partial class V1alpha1Subject + { + /// + /// Initializes a new instance of the V1alpha1Subject class. + /// + public V1alpha1Subject() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1alpha1Subject class. + /// + /// Kind of object being referenced. Values defined + /// by this API group are "User", "Group", and "ServiceAccount". If the + /// Authorizer does not recognized the kind value, the Authorizer + /// should report an error. + /// Name of the object being referenced. + /// APIVersion holds the API group and version + /// of the referenced subject. Defaults to "v1" for ServiceAccount + /// subjects. Defaults to "rbac.authorization.k8s.io/v1alpha1" for User + /// and Group subjects. + /// Namespace of the referenced object. + /// If the object kind is non-namespace, such as "User" or "Group", and + /// this value is not empty the Authorizer should report an + /// error. + public V1alpha1Subject(string kind, string name, string apiVersion = default(string), string namespaceProperty = default(string)) + { + ApiVersion = apiVersion; + Kind = kind; + Name = name; + NamespaceProperty = namespaceProperty; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion holds the API group and version of the + /// referenced subject. Defaults to "v1" for ServiceAccount subjects. + /// Defaults to "rbac.authorization.k8s.io/v1alpha1" for User and Group + /// subjects. + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind of object being referenced. Values defined by + /// this API group are "User", "Group", and "ServiceAccount". If the + /// Authorizer does not recognized the kind value, the Authorizer + /// should report an error. + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets name of the object being referenced. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets namespace of the referenced object. If the object + /// kind is non-namespace, such as "User" or "Group", and this value is + /// not empty the Authorizer should report an error. + /// + [JsonProperty(PropertyName = "namespace")] + public string NamespaceProperty { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Kind == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/src/generated/Models/V1beta1APIVersion.cs b/src/generated/Models/V1beta1APIVersion.cs new file mode 100755 index 000000000..8800b8214 --- /dev/null +++ b/src/generated/Models/V1beta1APIVersion.cs @@ -0,0 +1,45 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// An APIVersion represents a single concrete version of an object model. + /// + public partial class V1beta1APIVersion + { + /// + /// Initializes a new instance of the V1beta1APIVersion class. + /// + public V1beta1APIVersion() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1APIVersion class. + /// + /// Name of this version (e.g. 'v1'). + public V1beta1APIVersion(string name = default(string)) + { + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of this version (e.g. 'v1'). + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1CertificateSigningRequest.cs b/src/generated/Models/V1beta1CertificateSigningRequest.cs new file mode 100755 index 000000000..9d2a165af --- /dev/null +++ b/src/generated/Models/V1beta1CertificateSigningRequest.cs @@ -0,0 +1,108 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Describes a certificate signing request + /// + public partial class V1beta1CertificateSigningRequest + { + /// + /// Initializes a new instance of the V1beta1CertificateSigningRequest + /// class. + /// + public V1beta1CertificateSigningRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1CertificateSigningRequest + /// class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// The certificate request itself and any + /// additional information. + /// Derived information about the request. + public V1beta1CertificateSigningRequest(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1CertificateSigningRequestSpec spec = default(V1beta1CertificateSigningRequestSpec), V1beta1CertificateSigningRequestStatus status = default(V1beta1CertificateSigningRequestStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets the certificate request itself and any additional + /// information. + /// + [JsonProperty(PropertyName = "spec")] + public V1beta1CertificateSigningRequestSpec Spec { get; set; } + + /// + /// Gets or sets derived information about the request. + /// + [JsonProperty(PropertyName = "status")] + public V1beta1CertificateSigningRequestStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1CertificateSigningRequestCondition.cs b/src/generated/Models/V1beta1CertificateSigningRequestCondition.cs new file mode 100755 index 000000000..8da3e37ec --- /dev/null +++ b/src/generated/Models/V1beta1CertificateSigningRequestCondition.cs @@ -0,0 +1,86 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + public partial class V1beta1CertificateSigningRequestCondition + { + /// + /// Initializes a new instance of the + /// V1beta1CertificateSigningRequestCondition class. + /// + public V1beta1CertificateSigningRequestCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V1beta1CertificateSigningRequestCondition class. + /// + /// request approval state, currently Approved or + /// Denied. + /// timestamp for the last update to this + /// condition + /// human readable message with details about the + /// request state + /// brief reason for the request state + public V1beta1CertificateSigningRequestCondition(string type, System.DateTime? lastUpdateTime = default(System.DateTime?), string message = default(string), string reason = default(string)) + { + LastUpdateTime = lastUpdateTime; + Message = message; + Reason = reason; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets timestamp for the last update to this condition + /// + [JsonProperty(PropertyName = "lastUpdateTime")] + public System.DateTime? LastUpdateTime { get; set; } + + /// + /// Gets or sets human readable message with details about the request + /// state + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets brief reason for the request state + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets request approval state, currently Approved or Denied. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/src/generated/Models/V1beta1CertificateSigningRequestList.cs b/src/generated/Models/V1beta1CertificateSigningRequestList.cs new file mode 100755 index 000000000..04f8ec6f2 --- /dev/null +++ b/src/generated/Models/V1beta1CertificateSigningRequestList.cs @@ -0,0 +1,106 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class V1beta1CertificateSigningRequestList + { + /// + /// Initializes a new instance of the + /// V1beta1CertificateSigningRequestList class. + /// + public V1beta1CertificateSigningRequestList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V1beta1CertificateSigningRequestList class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1beta1CertificateSigningRequestList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1CertificateSigningRequestSpec.cs b/src/generated/Models/V1beta1CertificateSigningRequestSpec.cs new file mode 100755 index 000000000..8096a0713 --- /dev/null +++ b/src/generated/Models/V1beta1CertificateSigningRequestSpec.cs @@ -0,0 +1,119 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This information is immutable after the request is created. Only the + /// Request and Usages fields can be set on creation, other fields are + /// derived by Kubernetes and cannot be modified by users. + /// + public partial class V1beta1CertificateSigningRequestSpec + { + /// + /// Initializes a new instance of the + /// V1beta1CertificateSigningRequestSpec class. + /// + public V1beta1CertificateSigningRequestSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V1beta1CertificateSigningRequestSpec class. + /// + /// Base64-encoded PKCS#10 CSR data + /// Extra information about the requesting user. + /// See user.Info interface for details. + /// Group information about the requesting user. + /// See user.Info interface for details. + /// UID information about the requesting user. See + /// user.Info interface for details. + /// allowedUsages specifies a set of usage + /// contexts the key will be valid for. See: + /// https://tools.ietf.org/html/rfc5280#section-4.2.1.3 + /// https://tools.ietf.org/html/rfc5280#section-4.2.1.12 + /// Information about the requesting user. See + /// user.Info interface for details. + public V1beta1CertificateSigningRequestSpec(byte[] request, IDictionary> extra = default(IDictionary>), IList groups = default(IList), string uid = default(string), IList usages = default(IList), string username = default(string)) + { + Extra = extra; + Groups = groups; + Request = request; + Uid = uid; + Usages = usages; + Username = username; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets extra information about the requesting user. See + /// user.Info interface for details. + /// + [JsonProperty(PropertyName = "extra")] + public IDictionary> Extra { get; set; } + + /// + /// Gets or sets group information about the requesting user. See + /// user.Info interface for details. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; set; } + + /// + /// Gets or sets base64-encoded PKCS#10 CSR data + /// + [JsonProperty(PropertyName = "request")] + public byte[] Request { get; set; } + + /// + /// Gets or sets UID information about the requesting user. See + /// user.Info interface for details. + /// + [JsonProperty(PropertyName = "uid")] + public string Uid { get; set; } + + /// + /// Gets or sets allowedUsages specifies a set of usage contexts the + /// key will be valid for. See: + /// https://tools.ietf.org/html/rfc5280#section-4.2.1.3 + /// https://tools.ietf.org/html/rfc5280#section-4.2.1.12 + /// + [JsonProperty(PropertyName = "usages")] + public IList Usages { get; set; } + + /// + /// Gets or sets information about the requesting user. See user.Info + /// interface for details. + /// + [JsonProperty(PropertyName = "username")] + public string Username { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Request"); + } + } + } +} diff --git a/src/generated/Models/V1beta1CertificateSigningRequestStatus.cs b/src/generated/Models/V1beta1CertificateSigningRequestStatus.cs new file mode 100755 index 000000000..25c187287 --- /dev/null +++ b/src/generated/Models/V1beta1CertificateSigningRequestStatus.cs @@ -0,0 +1,58 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class V1beta1CertificateSigningRequestStatus + { + /// + /// Initializes a new instance of the + /// V1beta1CertificateSigningRequestStatus class. + /// + public V1beta1CertificateSigningRequestStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V1beta1CertificateSigningRequestStatus class. + /// + /// If request was approved, the controller + /// will place the issued certificate here. + /// Conditions applied to the request, such as + /// approval or denial. + public V1beta1CertificateSigningRequestStatus(byte[] certificate = default(byte[]), IList conditions = default(IList)) + { + Certificate = certificate; + Conditions = conditions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if request was approved, the controller will place the + /// issued certificate here. + /// + [JsonProperty(PropertyName = "certificate")] + public byte[] Certificate { get; set; } + + /// + /// Gets or sets conditions applied to the request, such as approval or + /// denial. + /// + [JsonProperty(PropertyName = "conditions")] + public IList Conditions { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1ClusterRole.cs b/src/generated/Models/V1beta1ClusterRole.cs new file mode 100755 index 000000000..9bbb7bfeb --- /dev/null +++ b/src/generated/Models/V1beta1ClusterRole.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ClusterRole is a cluster level, logical grouping of PolicyRules that + /// can be referenced as a unit by a RoleBinding or ClusterRoleBinding. + /// + public partial class V1beta1ClusterRole + { + /// + /// Initializes a new instance of the V1beta1ClusterRole class. + /// + public V1beta1ClusterRole() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1ClusterRole class. + /// + /// Rules holds all the PolicyRules for this + /// ClusterRole + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1beta1ClusterRole(IList rules, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Rules = rules; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets rules holds all the PolicyRules for this ClusterRole + /// + [JsonProperty(PropertyName = "rules")] + public IList Rules { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Rules == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Rules"); + } + if (Rules != null) + { + foreach (var element in Rules) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1ClusterRoleBinding.cs b/src/generated/Models/V1beta1ClusterRoleBinding.cs new file mode 100755 index 000000000..2910bf900 --- /dev/null +++ b/src/generated/Models/V1beta1ClusterRoleBinding.cs @@ -0,0 +1,135 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ClusterRoleBinding references a ClusterRole, but not contain it. It + /// can reference a ClusterRole in the global namespace, and adds who + /// information via Subject. + /// + public partial class V1beta1ClusterRoleBinding + { + /// + /// Initializes a new instance of the V1beta1ClusterRoleBinding class. + /// + public V1beta1ClusterRoleBinding() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1ClusterRoleBinding class. + /// + /// RoleRef can only reference a ClusterRole in + /// the global namespace. If the RoleRef cannot be resolved, the + /// Authorizer must return an error. + /// Subjects holds references to the objects the + /// role applies to. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1beta1ClusterRoleBinding(V1beta1RoleRef roleRef, IList subjects, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + RoleRef = roleRef; + Subjects = subjects; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets roleRef can only reference a ClusterRole in the global + /// namespace. If the RoleRef cannot be resolved, the Authorizer must + /// return an error. + /// + [JsonProperty(PropertyName = "roleRef")] + public V1beta1RoleRef RoleRef { get; set; } + + /// + /// Gets or sets subjects holds references to the objects the role + /// applies to. + /// + [JsonProperty(PropertyName = "subjects")] + public IList Subjects { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (RoleRef == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RoleRef"); + } + if (Subjects == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Subjects"); + } + if (RoleRef != null) + { + RoleRef.Validate(); + } + if (Subjects != null) + { + foreach (var element in Subjects) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1ClusterRoleBindingList.cs b/src/generated/Models/V1beta1ClusterRoleBindingList.cs new file mode 100755 index 000000000..c8e99e728 --- /dev/null +++ b/src/generated/Models/V1beta1ClusterRoleBindingList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ClusterRoleBindingList is a collection of ClusterRoleBindings + /// + public partial class V1beta1ClusterRoleBindingList + { + /// + /// Initializes a new instance of the V1beta1ClusterRoleBindingList + /// class. + /// + public V1beta1ClusterRoleBindingList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1ClusterRoleBindingList + /// class. + /// + /// Items is a list of ClusterRoleBindings + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1beta1ClusterRoleBindingList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of ClusterRoleBindings + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1ClusterRoleList.cs b/src/generated/Models/V1beta1ClusterRoleList.cs new file mode 100755 index 000000000..258e74df7 --- /dev/null +++ b/src/generated/Models/V1beta1ClusterRoleList.cs @@ -0,0 +1,111 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ClusterRoleList is a collection of ClusterRoles + /// + public partial class V1beta1ClusterRoleList + { + /// + /// Initializes a new instance of the V1beta1ClusterRoleList class. + /// + public V1beta1ClusterRoleList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1ClusterRoleList class. + /// + /// Items is a list of ClusterRoles + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1beta1ClusterRoleList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of ClusterRoles + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1DaemonSet.cs b/src/generated/Models/V1beta1DaemonSet.cs new file mode 100755 index 000000000..f396f9422 --- /dev/null +++ b/src/generated/Models/V1beta1DaemonSet.cs @@ -0,0 +1,121 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// DaemonSet represents the configuration of a daemon set. + /// + public partial class V1beta1DaemonSet + { + /// + /// Initializes a new instance of the V1beta1DaemonSet class. + /// + public V1beta1DaemonSet() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1DaemonSet class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// The desired behavior of this daemon set. More + /// info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// The current status of this daemon set. This + /// data may be out of date by some window of time. Populated by the + /// system. Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1beta1DaemonSet(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1DaemonSetSpec spec = default(V1beta1DaemonSetSpec), V1beta1DaemonSetStatus status = default(V1beta1DaemonSetStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets the desired behavior of this daemon set. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1beta1DaemonSetSpec Spec { get; set; } + + /// + /// Gets or sets the current status of this daemon set. This data may + /// be out of date by some window of time. Populated by the system. + /// Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "status")] + public V1beta1DaemonSetStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1DaemonSetList.cs b/src/generated/Models/V1beta1DaemonSetList.cs new file mode 100755 index 000000000..08c70ed49 --- /dev/null +++ b/src/generated/Models/V1beta1DaemonSetList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DaemonSetList is a collection of daemon sets. + /// + public partial class V1beta1DaemonSetList + { + /// + /// Initializes a new instance of the V1beta1DaemonSetList class. + /// + public V1beta1DaemonSetList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1DaemonSetList class. + /// + /// A list of daemon sets. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1beta1DaemonSetList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets a list of daemon sets. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1DaemonSetSpec.cs b/src/generated/Models/V1beta1DaemonSetSpec.cs new file mode 100755 index 000000000..e6bc3a5c2 --- /dev/null +++ b/src/generated/Models/V1beta1DaemonSetSpec.cs @@ -0,0 +1,122 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// DaemonSetSpec is the specification of a daemon set. + /// + public partial class V1beta1DaemonSetSpec + { + /// + /// Initializes a new instance of the V1beta1DaemonSetSpec class. + /// + public V1beta1DaemonSetSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1DaemonSetSpec class. + /// + /// An object that describes the pod that will + /// be created. The DaemonSet will create exactly one copy of this pod + /// on every node that matches the template's node selector (or on + /// every node if no node selector is specified). More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#pod-template + /// The minimum number of seconds for + /// which a newly created DaemonSet pod should be ready without any of + /// its container crashing, for it to be considered available. Defaults + /// to 0 (pod will be considered available as soon as it is + /// ready). + /// A label query over pods that are managed by + /// the daemon set. Must match in order to be controlled. If empty, + /// defaulted to labels on Pod template. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// A sequence number representing a + /// specific generation of the template. Populated by the system. It + /// can be set only during the creation. + /// An update strategy to replace existing + /// DaemonSet pods with new pods. + public V1beta1DaemonSetSpec(V1PodTemplateSpec template, int? minReadySeconds = default(int?), V1LabelSelector selector = default(V1LabelSelector), long? templateGeneration = default(long?), V1beta1DaemonSetUpdateStrategy updateStrategy = default(V1beta1DaemonSetUpdateStrategy)) + { + MinReadySeconds = minReadySeconds; + Selector = selector; + Template = template; + TemplateGeneration = templateGeneration; + UpdateStrategy = updateStrategy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the minimum number of seconds for which a newly + /// created DaemonSet pod should be ready without any of its container + /// crashing, for it to be considered available. Defaults to 0 (pod + /// will be considered available as soon as it is ready). + /// + [JsonProperty(PropertyName = "minReadySeconds")] + public int? MinReadySeconds { get; set; } + + /// + /// Gets or sets a label query over pods that are managed by the daemon + /// set. Must match in order to be controlled. If empty, defaulted to + /// labels on Pod template. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// + [JsonProperty(PropertyName = "selector")] + public V1LabelSelector Selector { get; set; } + + /// + /// Gets or sets an object that describes the pod that will be created. + /// The DaemonSet will create exactly one copy of this pod on every + /// node that matches the template's node selector (or on every node if + /// no node selector is specified). More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#pod-template + /// + [JsonProperty(PropertyName = "template")] + public V1PodTemplateSpec Template { get; set; } + + /// + /// Gets or sets a sequence number representing a specific generation + /// of the template. Populated by the system. It can be set only during + /// the creation. + /// + [JsonProperty(PropertyName = "templateGeneration")] + public long? TemplateGeneration { get; set; } + + /// + /// Gets or sets an update strategy to replace existing DaemonSet pods + /// with new pods. + /// + [JsonProperty(PropertyName = "updateStrategy")] + public V1beta1DaemonSetUpdateStrategy UpdateStrategy { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Template == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Template"); + } + if (Template != null) + { + Template.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1DaemonSetStatus.cs b/src/generated/Models/V1beta1DaemonSetStatus.cs new file mode 100755 index 000000000..b5069d817 --- /dev/null +++ b/src/generated/Models/V1beta1DaemonSetStatus.cs @@ -0,0 +1,142 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// DaemonSetStatus represents the current status of a daemon set. + /// + public partial class V1beta1DaemonSetStatus + { + /// + /// Initializes a new instance of the V1beta1DaemonSetStatus class. + /// + public V1beta1DaemonSetStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1DaemonSetStatus class. + /// + /// The number of nodes that are + /// running at least 1 daemon pod and are supposed to run the daemon + /// pod. More info: + /// http://releases.k8s.io/HEAD/docs/admin/daemons.md + /// The total number of nodes that + /// should be running the daemon pod (including nodes correctly running + /// the daemon pod). More info: + /// http://releases.k8s.io/HEAD/docs/admin/daemons.md + /// The number of nodes that are + /// running the daemon pod, but are not supposed to run the daemon pod. + /// More info: + /// http://releases.k8s.io/HEAD/docs/admin/daemons.md + /// The number of nodes that should be + /// running the daemon pod and have one or more of the daemon pod + /// running and ready. + /// The number of nodes that should be + /// running the daemon pod and have one or more of the daemon pod + /// running and available (ready for at least + /// spec.minReadySeconds) + /// The number of nodes that should be + /// running the daemon pod and have none of the daemon pod running and + /// available (ready for at least spec.minReadySeconds) + /// The most recent generation + /// observed by the daemon set controller. + /// The total number of nodes that + /// are running updated daemon pod + public V1beta1DaemonSetStatus(int currentNumberScheduled, int desiredNumberScheduled, int numberMisscheduled, int numberReady, int? numberAvailable = default(int?), int? numberUnavailable = default(int?), long? observedGeneration = default(long?), int? updatedNumberScheduled = default(int?)) + { + CurrentNumberScheduled = currentNumberScheduled; + DesiredNumberScheduled = desiredNumberScheduled; + NumberAvailable = numberAvailable; + NumberMisscheduled = numberMisscheduled; + NumberReady = numberReady; + NumberUnavailable = numberUnavailable; + ObservedGeneration = observedGeneration; + UpdatedNumberScheduled = updatedNumberScheduled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the number of nodes that are running at least 1 daemon + /// pod and are supposed to run the daemon pod. More info: + /// http://releases.k8s.io/HEAD/docs/admin/daemons.md + /// + [JsonProperty(PropertyName = "currentNumberScheduled")] + public int CurrentNumberScheduled { get; set; } + + /// + /// Gets or sets the total number of nodes that should be running the + /// daemon pod (including nodes correctly running the daemon pod). More + /// info: http://releases.k8s.io/HEAD/docs/admin/daemons.md + /// + [JsonProperty(PropertyName = "desiredNumberScheduled")] + public int DesiredNumberScheduled { get; set; } + + /// + /// Gets or sets the number of nodes that should be running the daemon + /// pod and have one or more of the daemon pod running and available + /// (ready for at least spec.minReadySeconds) + /// + [JsonProperty(PropertyName = "numberAvailable")] + public int? NumberAvailable { get; set; } + + /// + /// Gets or sets the number of nodes that are running the daemon pod, + /// but are not supposed to run the daemon pod. More info: + /// http://releases.k8s.io/HEAD/docs/admin/daemons.md + /// + [JsonProperty(PropertyName = "numberMisscheduled")] + public int NumberMisscheduled { get; set; } + + /// + /// Gets or sets the number of nodes that should be running the daemon + /// pod and have one or more of the daemon pod running and ready. + /// + [JsonProperty(PropertyName = "numberReady")] + public int NumberReady { get; set; } + + /// + /// Gets or sets the number of nodes that should be running the daemon + /// pod and have none of the daemon pod running and available (ready + /// for at least spec.minReadySeconds) + /// + [JsonProperty(PropertyName = "numberUnavailable")] + public int? NumberUnavailable { get; set; } + + /// + /// Gets or sets the most recent generation observed by the daemon set + /// controller. + /// + [JsonProperty(PropertyName = "observedGeneration")] + public long? ObservedGeneration { get; set; } + + /// + /// Gets or sets the total number of nodes that are running updated + /// daemon pod + /// + [JsonProperty(PropertyName = "updatedNumberScheduled")] + public int? UpdatedNumberScheduled { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1beta1DaemonSetUpdateStrategy.cs b/src/generated/Models/V1beta1DaemonSetUpdateStrategy.cs new file mode 100755 index 000000000..9acba8c3a --- /dev/null +++ b/src/generated/Models/V1beta1DaemonSetUpdateStrategy.cs @@ -0,0 +1,56 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class V1beta1DaemonSetUpdateStrategy + { + /// + /// Initializes a new instance of the V1beta1DaemonSetUpdateStrategy + /// class. + /// + public V1beta1DaemonSetUpdateStrategy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1DaemonSetUpdateStrategy + /// class. + /// + /// Rolling update config params. Present + /// only if type = "RollingUpdate". + /// Type of daemon set update. Can be + /// "RollingUpdate" or "OnDelete". Default is OnDelete. + public V1beta1DaemonSetUpdateStrategy(V1beta1RollingUpdateDaemonSet rollingUpdate = default(V1beta1RollingUpdateDaemonSet), string type = default(string)) + { + RollingUpdate = rollingUpdate; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets rolling update config params. Present only if type = + /// "RollingUpdate". + /// + [JsonProperty(PropertyName = "rollingUpdate")] + public V1beta1RollingUpdateDaemonSet RollingUpdate { get; set; } + + /// + /// Gets or sets type of daemon set update. Can be "RollingUpdate" or + /// "OnDelete". Default is OnDelete. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1Eviction.cs b/src/generated/Models/V1beta1Eviction.cs new file mode 100755 index 000000000..db3bbca04 --- /dev/null +++ b/src/generated/Models/V1beta1Eviction.cs @@ -0,0 +1,89 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Eviction evicts a pod from its node subject to certain policies and + /// safety constraints. This is a subresource of Pod. A request to cause + /// such an eviction is created by POSTing to .../pods/<pod + /// name>/evictions. + /// + public partial class V1beta1Eviction + { + /// + /// Initializes a new instance of the V1beta1Eviction class. + /// + public V1beta1Eviction() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1Eviction class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// DeleteOptions may be provided + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// ObjectMeta describes the pod that is being + /// evicted. + public V1beta1Eviction(string apiVersion = default(string), V1DeleteOptions deleteOptions = default(V1DeleteOptions), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + DeleteOptions = deleteOptions; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets deleteOptions may be provided + /// + [JsonProperty(PropertyName = "deleteOptions")] + public V1DeleteOptions DeleteOptions { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets objectMeta describes the pod that is being evicted. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1FSGroupStrategyOptions.cs b/src/generated/Models/V1beta1FSGroupStrategyOptions.cs new file mode 100755 index 000000000..3ef8946af --- /dev/null +++ b/src/generated/Models/V1beta1FSGroupStrategyOptions.cs @@ -0,0 +1,64 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// FSGroupStrategyOptions defines the strategy type and options used to + /// create the strategy. + /// + public partial class V1beta1FSGroupStrategyOptions + { + /// + /// Initializes a new instance of the V1beta1FSGroupStrategyOptions + /// class. + /// + public V1beta1FSGroupStrategyOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1FSGroupStrategyOptions + /// class. + /// + /// Ranges are the allowed ranges of fs groups. + /// If you would like to force a single fs group then supply a single + /// range with the same start and end. + /// Rule is the strategy that will dictate what + /// FSGroup is used in the SecurityContext. + public V1beta1FSGroupStrategyOptions(IList ranges = default(IList), string rule = default(string)) + { + Ranges = ranges; + Rule = rule; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets ranges are the allowed ranges of fs groups. If you + /// would like to force a single fs group then supply a single range + /// with the same start and end. + /// + [JsonProperty(PropertyName = "ranges")] + public IList Ranges { get; set; } + + /// + /// Gets or sets rule is the strategy that will dictate what FSGroup is + /// used in the SecurityContext. + /// + [JsonProperty(PropertyName = "rule")] + public string Rule { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1HTTPIngressPath.cs b/src/generated/Models/V1beta1HTTPIngressPath.cs new file mode 100755 index 000000000..8a8f22939 --- /dev/null +++ b/src/generated/Models/V1beta1HTTPIngressPath.cs @@ -0,0 +1,86 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// HTTPIngressPath associates a path regex with a backend. Incoming urls + /// matching the path are forwarded to the backend. + /// + public partial class V1beta1HTTPIngressPath + { + /// + /// Initializes a new instance of the V1beta1HTTPIngressPath class. + /// + public V1beta1HTTPIngressPath() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1HTTPIngressPath class. + /// + /// Backend defines the referenced service + /// endpoint to which the traffic will be forwarded to. + /// Path is an extended POSIX regex as defined by + /// IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the + /// perl syntax) matched against the path of an incoming request. + /// Currently it can contain characters disallowed from the + /// conventional "path" part of a URL as defined by RFC 3986. Paths + /// must begin with a '/'. If unspecified, the path defaults to a catch + /// all sending traffic to the backend. + public V1beta1HTTPIngressPath(V1beta1IngressBackend backend, string path = default(string)) + { + Backend = backend; + Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets backend defines the referenced service endpoint to + /// which the traffic will be forwarded to. + /// + [JsonProperty(PropertyName = "backend")] + public V1beta1IngressBackend Backend { get; set; } + + /// + /// Gets or sets path is an extended POSIX regex as defined by IEEE Std + /// 1003.1, (i.e this follows the egrep/unix syntax, not the perl + /// syntax) matched against the path of an incoming request. Currently + /// it can contain characters disallowed from the conventional "path" + /// part of a URL as defined by RFC 3986. Paths must begin with a '/'. + /// If unspecified, the path defaults to a catch all sending traffic to + /// the backend. + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Backend == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Backend"); + } + if (Backend != null) + { + Backend.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1HTTPIngressRuleValue.cs b/src/generated/Models/V1beta1HTTPIngressRuleValue.cs new file mode 100755 index 000000000..1ce6f708d --- /dev/null +++ b/src/generated/Models/V1beta1HTTPIngressRuleValue.cs @@ -0,0 +1,78 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HTTPIngressRuleValue is a list of http selectors pointing to backends. + /// In the example: http://<host>/<path>?<searchpart> + /// -> 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 '#'. + /// + public partial class V1beta1HTTPIngressRuleValue + { + /// + /// Initializes a new instance of the V1beta1HTTPIngressRuleValue + /// class. + /// + public V1beta1HTTPIngressRuleValue() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1HTTPIngressRuleValue + /// class. + /// + /// A collection of paths that map requests to + /// backends. + public V1beta1HTTPIngressRuleValue(IList paths) + { + Paths = paths; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a collection of paths that map requests to backends. + /// + [JsonProperty(PropertyName = "paths")] + public IList Paths { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Paths == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Paths"); + } + if (Paths != null) + { + foreach (var element in Paths) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1HostPortRange.cs b/src/generated/Models/V1beta1HostPortRange.cs new file mode 100755 index 000000000..a3a4df6be --- /dev/null +++ b/src/generated/Models/V1beta1HostPortRange.cs @@ -0,0 +1,65 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Host Port Range defines a range of host ports that will be enabled by a + /// policy for pods to use. It requires both the start and end to be + /// defined. + /// + public partial class V1beta1HostPortRange + { + /// + /// Initializes a new instance of the V1beta1HostPortRange class. + /// + public V1beta1HostPortRange() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1HostPortRange class. + /// + /// max is the end of the range, inclusive. + /// min is the start of the range, inclusive. + public V1beta1HostPortRange(int max, int min) + { + Max = max; + Min = min; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets max is the end of the range, inclusive. + /// + [JsonProperty(PropertyName = "max")] + public int Max { get; set; } + + /// + /// Gets or sets min is the start of the range, inclusive. + /// + [JsonProperty(PropertyName = "min")] + public int Min { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1beta1IDRange.cs b/src/generated/Models/V1beta1IDRange.cs new file mode 100755 index 000000000..6e76b3abc --- /dev/null +++ b/src/generated/Models/V1beta1IDRange.cs @@ -0,0 +1,63 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ID Range provides a min/max of an allowed range of IDs. + /// + public partial class V1beta1IDRange + { + /// + /// Initializes a new instance of the V1beta1IDRange class. + /// + public V1beta1IDRange() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1IDRange class. + /// + /// Max is the end of the range, inclusive. + /// Min is the start of the range, inclusive. + public V1beta1IDRange(long max, long min) + { + Max = max; + Min = min; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets max is the end of the range, inclusive. + /// + [JsonProperty(PropertyName = "max")] + public long Max { get; set; } + + /// + /// Gets or sets min is the start of the range, inclusive. + /// + [JsonProperty(PropertyName = "min")] + public long Min { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1beta1Ingress.cs b/src/generated/Models/V1beta1Ingress.cs new file mode 100755 index 000000000..d8461169d --- /dev/null +++ b/src/generated/Models/V1beta1Ingress.cs @@ -0,0 +1,117 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Ingress is a collection of rules that allow inbound connections to + /// reach the endpoints defined by a backend. An Ingress can be configured + /// to give services externally-reachable urls, load balance traffic, + /// terminate SSL, offer name based virtual hosting etc. + /// + public partial class V1beta1Ingress + { + /// + /// Initializes a new instance of the V1beta1Ingress class. + /// + public V1beta1Ingress() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1Ingress class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Spec is the desired state of the Ingress. More + /// info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// Status is the current state of the Ingress. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1beta1Ingress(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1IngressSpec spec = default(V1beta1IngressSpec), V1beta1IngressStatus status = default(V1beta1IngressStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec is the desired state of the Ingress. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1beta1IngressSpec Spec { get; set; } + + /// + /// Gets or sets status is the current state of the Ingress. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "status")] + public V1beta1IngressStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1IngressBackend.cs b/src/generated/Models/V1beta1IngressBackend.cs new file mode 100755 index 000000000..d8a5e6bbc --- /dev/null +++ b/src/generated/Models/V1beta1IngressBackend.cs @@ -0,0 +1,73 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// IngressBackend describes all endpoints for a given service and port. + /// + public partial class V1beta1IngressBackend + { + /// + /// Initializes a new instance of the V1beta1IngressBackend class. + /// + public V1beta1IngressBackend() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1IngressBackend class. + /// + /// Specifies the name of the referenced + /// service. + /// Specifies the port of the referenced + /// service. + public V1beta1IngressBackend(string serviceName, string servicePort) + { + ServiceName = serviceName; + ServicePort = servicePort; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the name of the referenced service. + /// + [JsonProperty(PropertyName = "serviceName")] + public string ServiceName { get; set; } + + /// + /// Gets or sets specifies the port of the referenced service. + /// + [JsonProperty(PropertyName = "servicePort")] + public string ServicePort { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServiceName"); + } + if (ServicePort == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServicePort"); + } + } + } +} diff --git a/src/generated/Models/V1beta1IngressList.cs b/src/generated/Models/V1beta1IngressList.cs new file mode 100755 index 000000000..f51b77a66 --- /dev/null +++ b/src/generated/Models/V1beta1IngressList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// IngressList is a collection of Ingress. + /// + public partial class V1beta1IngressList + { + /// + /// Initializes a new instance of the V1beta1IngressList class. + /// + public V1beta1IngressList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1IngressList class. + /// + /// Items is the list of Ingress. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1beta1IngressList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is the list of Ingress. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1IngressRule.cs b/src/generated/Models/V1beta1IngressRule.cs new file mode 100755 index 000000000..7f5526df9 --- /dev/null +++ b/src/generated/Models/V1beta1IngressRule.cs @@ -0,0 +1,91 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// IngressRule represents the rules mapping the paths under a specified + /// host to the related backend services. Incoming requests are first + /// evaluated for a host match, then routed to the backend associated with + /// the matching IngressRuleValue. + /// + public partial class V1beta1IngressRule + { + /// + /// Initializes a new instance of the V1beta1IngressRule class. + /// + public V1beta1IngressRule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1IngressRule class. + /// + /// Host is the fully qualified domain name of a + /// network host, as defined by RFC 3986. Note the following deviations + /// from the "host" part of the URI as defined in the RFC: 1. IPs are + /// not allowed. Currently an IngressRuleValue can only apply to the + /// IP in the Spec of the parent Ingress. + /// 2. The `:` delimiter is not respected because ports are not + /// allowed. + /// Currently the port of an Ingress is implicitly :80 for http and + /// :443 for https. + /// Both these may change in the future. Incoming requests are matched + /// against the host before the IngressRuleValue. If the host is + /// unspecified, the Ingress routes all traffic based on the specified + /// IngressRuleValue. + public V1beta1IngressRule(string host = default(string), V1beta1HTTPIngressRuleValue http = default(V1beta1HTTPIngressRuleValue)) + { + Host = host; + Http = http; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets host is the fully qualified domain name of a network + /// host, as defined by RFC 3986. Note the following deviations from + /// the "host" part of the URI as defined in the RFC: 1. IPs are not + /// allowed. Currently an IngressRuleValue can only apply to the + /// IP in the Spec of the parent Ingress. + /// 2. The `:` delimiter is not respected because ports are not + /// allowed. + /// Currently the port of an Ingress is implicitly :80 for http and + /// :443 for https. + /// Both these may change in the future. Incoming requests are matched + /// against the host before the IngressRuleValue. If the host is + /// unspecified, the Ingress routes all traffic based on the specified + /// IngressRuleValue. + /// + [JsonProperty(PropertyName = "host")] + public string Host { get; set; } + + /// + /// + [JsonProperty(PropertyName = "http")] + public V1beta1HTTPIngressRuleValue Http { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Http != null) + { + Http.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1IngressSpec.cs b/src/generated/Models/V1beta1IngressSpec.cs new file mode 100755 index 000000000..c594abd18 --- /dev/null +++ b/src/generated/Models/V1beta1IngressSpec.cs @@ -0,0 +1,106 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// IngressSpec describes the Ingress the user wishes to exist. + /// + public partial class V1beta1IngressSpec + { + /// + /// Initializes a new instance of the V1beta1IngressSpec class. + /// + public V1beta1IngressSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1IngressSpec class. + /// + /// A default backend capable of servicing + /// requests that don't match any rule. At least one of 'backend' or + /// 'rules' must be specified. This field is optional to allow the + /// loadbalancer controller or defaulting logic to specify a global + /// default. + /// A list of host rules used to configure the + /// Ingress. If unspecified, or no rule matches, all traffic is sent to + /// the default backend. + /// TLS configuration. Currently the Ingress only + /// supports a single TLS port, 443. If multiple members of this list + /// specify different hosts, they will be multiplexed on the same port + /// according to the hostname specified through the SNI TLS extension, + /// if the ingress controller fulfilling the ingress supports + /// SNI. + public V1beta1IngressSpec(V1beta1IngressBackend backend = default(V1beta1IngressBackend), IList rules = default(IList), IList tls = default(IList)) + { + Backend = backend; + Rules = rules; + Tls = tls; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a default backend capable of servicing requests that + /// don't match any rule. At least one of 'backend' or 'rules' must be + /// specified. This field is optional to allow the loadbalancer + /// controller or defaulting logic to specify a global default. + /// + [JsonProperty(PropertyName = "backend")] + public V1beta1IngressBackend Backend { get; set; } + + /// + /// Gets or sets a list of host rules used to configure the Ingress. If + /// unspecified, or no rule matches, all traffic is sent to the default + /// backend. + /// + [JsonProperty(PropertyName = "rules")] + public IList Rules { get; set; } + + /// + /// Gets or sets TLS configuration. Currently the Ingress only supports + /// a single TLS port, 443. If multiple members of this list specify + /// different hosts, they will be multiplexed on the same port + /// according to the hostname specified through the SNI TLS extension, + /// if the ingress controller fulfilling the ingress supports SNI. + /// + [JsonProperty(PropertyName = "tls")] + public IList Tls { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Backend != null) + { + Backend.Validate(); + } + if (Rules != null) + { + foreach (var element in Rules) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1IngressStatus.cs b/src/generated/Models/V1beta1IngressStatus.cs new file mode 100755 index 000000000..d74e84543 --- /dev/null +++ b/src/generated/Models/V1beta1IngressStatus.cs @@ -0,0 +1,47 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// IngressStatus describe the current state of the Ingress. + /// + public partial class V1beta1IngressStatus + { + /// + /// Initializes a new instance of the V1beta1IngressStatus class. + /// + public V1beta1IngressStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1IngressStatus class. + /// + /// LoadBalancer contains the current status + /// of the load-balancer. + public V1beta1IngressStatus(V1LoadBalancerStatus loadBalancer = default(V1LoadBalancerStatus)) + { + LoadBalancer = loadBalancer; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets loadBalancer contains the current status of the + /// load-balancer. + /// + [JsonProperty(PropertyName = "loadBalancer")] + public V1LoadBalancerStatus LoadBalancer { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1IngressTLS.cs b/src/generated/Models/V1beta1IngressTLS.cs new file mode 100755 index 000000000..90364f2d2 --- /dev/null +++ b/src/generated/Models/V1beta1IngressTLS.cs @@ -0,0 +1,74 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// IngressTLS describes the transport layer security associated with an + /// Ingress. + /// + public partial class V1beta1IngressTLS + { + /// + /// Initializes a new instance of the V1beta1IngressTLS class. + /// + public V1beta1IngressTLS() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1IngressTLS class. + /// + /// Hosts are a list of hosts included in the TLS + /// certificate. The values in this list must match the name/s used in + /// the tlsSecret. Defaults to the wildcard host setting for the + /// loadbalancer controller fulfilling this Ingress, if left + /// unspecified. + /// SecretName is the name of the secret used + /// to terminate SSL traffic on 443. Field is left optional to allow + /// SSL routing based on SNI hostname alone. If the SNI host in a + /// listener conflicts with the "Host" header field used by an + /// IngressRule, the SNI host is used for termination and value of the + /// Host header is used for routing. + public V1beta1IngressTLS(IList hosts = default(IList), string secretName = default(string)) + { + Hosts = hosts; + SecretName = secretName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets hosts are a list of hosts included in the TLS + /// certificate. The values in this list must match the name/s used in + /// the tlsSecret. Defaults to the wildcard host setting for the + /// loadbalancer controller fulfilling this Ingress, if left + /// unspecified. + /// + [JsonProperty(PropertyName = "hosts")] + public IList Hosts { get; set; } + + /// + /// Gets or sets secretName is the name of the secret used to terminate + /// SSL traffic on 443. Field is left optional to allow SSL routing + /// based on SNI hostname alone. If the SNI host in a listener + /// conflicts with the "Host" header field used by an IngressRule, the + /// SNI host is used for termination and value of the Host header is + /// used for routing. + /// + [JsonProperty(PropertyName = "secretName")] + public string SecretName { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1LocalSubjectAccessReview.cs b/src/generated/Models/V1beta1LocalSubjectAccessReview.cs new file mode 100755 index 000000000..ade0e605a --- /dev/null +++ b/src/generated/Models/V1beta1LocalSubjectAccessReview.cs @@ -0,0 +1,120 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// LocalSubjectAccessReview checks whether or not a user or group can + /// perform an action in a given namespace. Having a namespace scoped + /// resource makes it much easier to grant namespace scoped policy that + /// includes permissions checking. + /// + public partial class V1beta1LocalSubjectAccessReview + { + /// + /// Initializes a new instance of the V1beta1LocalSubjectAccessReview + /// class. + /// + public V1beta1LocalSubjectAccessReview() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1LocalSubjectAccessReview + /// class. + /// + /// Spec holds information about the request being + /// evaluated. spec.namespace must be equal to the namespace you made + /// the request against. If empty, it is defaulted. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Status is filled in by the server and + /// indicates whether the request is allowed or not + public V1beta1LocalSubjectAccessReview(V1beta1SubjectAccessReviewSpec spec, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1SubjectAccessReviewStatus status = default(V1beta1SubjectAccessReviewStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec holds information about the request being + /// evaluated. spec.namespace must be equal to the namespace you made + /// the request against. If empty, it is defaulted. + /// + [JsonProperty(PropertyName = "spec")] + public V1beta1SubjectAccessReviewSpec Spec { get; set; } + + /// + /// Gets or sets status is filled in by the server and indicates + /// whether the request is allowed or not + /// + [JsonProperty(PropertyName = "status")] + public V1beta1SubjectAccessReviewStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Spec"); + } + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1NetworkPolicy.cs b/src/generated/Models/V1beta1NetworkPolicy.cs new file mode 100755 index 000000000..2240ae414 --- /dev/null +++ b/src/generated/Models/V1beta1NetworkPolicy.cs @@ -0,0 +1,99 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class V1beta1NetworkPolicy + { + /// + /// Initializes a new instance of the V1beta1NetworkPolicy class. + /// + public V1beta1NetworkPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1NetworkPolicy class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Specification of the desired behavior for this + /// NetworkPolicy. + public V1beta1NetworkPolicy(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1NetworkPolicySpec spec = default(V1beta1NetworkPolicySpec)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets specification of the desired behavior for this + /// NetworkPolicy. + /// + [JsonProperty(PropertyName = "spec")] + public V1beta1NetworkPolicySpec Spec { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1NetworkPolicyIngressRule.cs b/src/generated/Models/V1beta1NetworkPolicyIngressRule.cs new file mode 100755 index 000000000..81a1a2d66 --- /dev/null +++ b/src/generated/Models/V1beta1NetworkPolicyIngressRule.cs @@ -0,0 +1,86 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This NetworkPolicyIngressRule matches traffic if and only if the + /// traffic matches both ports AND from. + /// + public partial class V1beta1NetworkPolicyIngressRule + { + /// + /// Initializes a new instance of the V1beta1NetworkPolicyIngressRule + /// class. + /// + public V1beta1NetworkPolicyIngressRule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1NetworkPolicyIngressRule + /// class. + /// + /// List of sources which should be able to + /// access the pods selected for this rule. Items in this list are + /// combined using a logical OR operation. If this field is not + /// provided, this rule matches all sources (traffic not restricted by + /// source). If this field is empty, this rule matches no sources (no + /// traffic matches). If this field is present and contains at least on + /// item, this rule allows traffic only if the traffic matches at least + /// one item in the from list. + /// List of ports which should be made accessible + /// on the pods selected for this rule. Each item in this list is + /// combined using a logical OR. If this field is not provided, this + /// rule matches all ports (traffic not restricted by port). If this + /// field is empty, this rule matches no ports (no traffic matches). If + /// this field is present and contains at least one item, then this + /// rule allows traffic only if the traffic matches at least one port + /// in the list. + public V1beta1NetworkPolicyIngressRule(IList fromProperty = default(IList), IList ports = default(IList)) + { + FromProperty = fromProperty; + Ports = ports; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of sources which should be able to access the + /// pods selected for this rule. Items in this list are combined using + /// a logical OR operation. If this field is not provided, this rule + /// matches all sources (traffic not restricted by source). If this + /// field is empty, this rule matches no sources (no traffic matches). + /// If this field is present and contains at least on item, this rule + /// allows traffic only if the traffic matches at least one item in the + /// from list. + /// + [JsonProperty(PropertyName = "from")] + public IList FromProperty { get; set; } + + /// + /// Gets or sets list of ports which should be made accessible on the + /// pods selected for this rule. Each item in this list is combined + /// using a logical OR. If this field is not provided, this rule + /// matches all ports (traffic not restricted by port). If this field + /// is empty, this rule matches no ports (no traffic matches). If this + /// field is present and contains at least one item, then this rule + /// allows traffic only if the traffic matches at least one port in the + /// list. + /// + [JsonProperty(PropertyName = "ports")] + public IList Ports { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1NetworkPolicyList.cs b/src/generated/Models/V1beta1NetworkPolicyList.cs new file mode 100755 index 000000000..8ccc1a495 --- /dev/null +++ b/src/generated/Models/V1beta1NetworkPolicyList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Network Policy List is a list of NetworkPolicy objects. + /// + public partial class V1beta1NetworkPolicyList + { + /// + /// Initializes a new instance of the V1beta1NetworkPolicyList class. + /// + public V1beta1NetworkPolicyList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1NetworkPolicyList class. + /// + /// Items is a list of schema objects. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1beta1NetworkPolicyList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of schema objects. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1NetworkPolicyPeer.cs b/src/generated/Models/V1beta1NetworkPolicyPeer.cs new file mode 100755 index 000000000..9e3943307 --- /dev/null +++ b/src/generated/Models/V1beta1NetworkPolicyPeer.cs @@ -0,0 +1,65 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class V1beta1NetworkPolicyPeer + { + /// + /// Initializes a new instance of the V1beta1NetworkPolicyPeer class. + /// + public V1beta1NetworkPolicyPeer() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1NetworkPolicyPeer class. + /// + /// Selects Namespaces using cluster + /// scoped-labels. This matches all pods in all namespaces selected by + /// this label selector. This field follows standard label selector + /// semantics. If omitted, this selector selects no namespaces. If + /// present but empty, this selector selects all namespaces. + /// This is a label selector which selects + /// Pods in this namespace. This field follows standard label selector + /// semantics. If not provided, this selector selects no pods. If + /// present but empty, this selector selects all pods in this + /// namespace. + public V1beta1NetworkPolicyPeer(V1LabelSelector namespaceSelector = default(V1LabelSelector), V1LabelSelector podSelector = default(V1LabelSelector)) + { + NamespaceSelector = namespaceSelector; + PodSelector = podSelector; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets selects Namespaces using cluster scoped-labels. This + /// matches all pods in all namespaces selected by this label selector. + /// This field follows standard label selector semantics. If omitted, + /// this selector selects no namespaces. If present but empty, this + /// selector selects all namespaces. + /// + [JsonProperty(PropertyName = "namespaceSelector")] + public V1LabelSelector NamespaceSelector { get; set; } + + /// + /// Gets or sets this is a label selector which selects Pods in this + /// namespace. This field follows standard label selector semantics. If + /// not provided, this selector selects no pods. If present but empty, + /// this selector selects all pods in this namespace. + /// + [JsonProperty(PropertyName = "podSelector")] + public V1LabelSelector PodSelector { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1NetworkPolicyPort.cs b/src/generated/Models/V1beta1NetworkPolicyPort.cs new file mode 100755 index 000000000..0308cfd0b --- /dev/null +++ b/src/generated/Models/V1beta1NetworkPolicyPort.cs @@ -0,0 +1,60 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class V1beta1NetworkPolicyPort + { + /// + /// Initializes a new instance of the V1beta1NetworkPolicyPort class. + /// + public V1beta1NetworkPolicyPort() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1NetworkPolicyPort class. + /// + /// If specified, the port on the given protocol. + /// This can either be a numerical or named port on a pod. If this + /// field is not provided, this matches all port names and numbers. If + /// present, only traffic on the specified protocol AND port will be + /// matched. + /// Optional. The protocol (TCP or UDP) which + /// traffic must match. If not specified, this field defaults to + /// TCP. + public V1beta1NetworkPolicyPort(string port = default(string), string protocol = default(string)) + { + Port = port; + Protocol = protocol; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if specified, the port on the given protocol. This + /// can either be a numerical or named port on a pod. If this field is + /// not provided, this matches all port names and numbers. If present, + /// only traffic on the specified protocol AND port will be matched. + /// + [JsonProperty(PropertyName = "port")] + public string Port { get; set; } + + /// + /// Gets or sets optional. The protocol (TCP or UDP) which traffic + /// must match. If not specified, this field defaults to TCP. + /// + [JsonProperty(PropertyName = "protocol")] + public string Protocol { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1NetworkPolicySpec.cs b/src/generated/Models/V1beta1NetworkPolicySpec.cs new file mode 100755 index 000000000..10cc82a0e --- /dev/null +++ b/src/generated/Models/V1beta1NetworkPolicySpec.cs @@ -0,0 +1,96 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + public partial class V1beta1NetworkPolicySpec + { + /// + /// Initializes a new instance of the V1beta1NetworkPolicySpec class. + /// + public V1beta1NetworkPolicySpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1NetworkPolicySpec class. + /// + /// Selects the pods to which this + /// NetworkPolicy object applies. The array of ingress rules is + /// applied to any pods selected by this field. Multiple network + /// policies can select the same set of pods. In this case, the + /// ingress rules for each are combined additively. This field is NOT + /// optional and follows standard label selector semantics. An empty + /// podSelector matches all pods in this namespace. + /// List of ingress rules to be applied to the + /// selected pods. Traffic is allowed to a pod if + /// namespace.networkPolicy.ingress.isolation is undefined and cluster + /// policy allows it, OR if the traffic source is the pod's local node, + /// OR if the traffic matches at least one ingress rule across all of + /// the NetworkPolicy objects whose podSelector matches the pod. If + /// this field is empty then this NetworkPolicy does not affect ingress + /// isolation. If this field is present and contains at least one rule, + /// this policy allows any traffic which matches at least one of the + /// ingress rules in this list. + public V1beta1NetworkPolicySpec(V1LabelSelector podSelector, IList ingress = default(IList)) + { + Ingress = ingress; + PodSelector = podSelector; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of ingress rules to be applied to the selected + /// pods. Traffic is allowed to a pod if + /// namespace.networkPolicy.ingress.isolation is undefined and cluster + /// policy allows it, OR if the traffic source is the pod's local node, + /// OR if the traffic matches at least one ingress rule across all of + /// the NetworkPolicy objects whose podSelector matches the pod. If + /// this field is empty then this NetworkPolicy does not affect ingress + /// isolation. If this field is present and contains at least one rule, + /// this policy allows any traffic which matches at least one of the + /// ingress rules in this list. + /// + [JsonProperty(PropertyName = "ingress")] + public IList Ingress { get; set; } + + /// + /// Gets or sets selects the pods to which this NetworkPolicy object + /// applies. The array of ingress rules is applied to any pods + /// selected by this field. Multiple network policies can select the + /// same set of pods. In this case, the ingress rules for each are + /// combined additively. This field is NOT optional and follows + /// standard label selector semantics. An empty podSelector matches all + /// pods in this namespace. + /// + [JsonProperty(PropertyName = "podSelector")] + public V1LabelSelector PodSelector { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PodSelector == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PodSelector"); + } + } + } +} diff --git a/src/generated/Models/V1beta1NonResourceAttributes.cs b/src/generated/Models/V1beta1NonResourceAttributes.cs new file mode 100755 index 000000000..21f018df8 --- /dev/null +++ b/src/generated/Models/V1beta1NonResourceAttributes.cs @@ -0,0 +1,56 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// NonResourceAttributes includes the authorization attributes available + /// for non-resource requests to the Authorizer interface + /// + public partial class V1beta1NonResourceAttributes + { + /// + /// Initializes a new instance of the V1beta1NonResourceAttributes + /// class. + /// + public V1beta1NonResourceAttributes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1NonResourceAttributes + /// class. + /// + /// Path is the URL path of the request + /// Verb is the standard HTTP verb + public V1beta1NonResourceAttributes(string path = default(string), string verb = default(string)) + { + Path = path; + Verb = verb; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets path is the URL path of the request + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + /// + /// Gets or sets verb is the standard HTTP verb + /// + [JsonProperty(PropertyName = "verb")] + public string Verb { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1PodDisruptionBudget.cs b/src/generated/Models/V1beta1PodDisruptionBudget.cs new file mode 100755 index 000000000..955c169b2 --- /dev/null +++ b/src/generated/Models/V1beta1PodDisruptionBudget.cs @@ -0,0 +1,109 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// PodDisruptionBudget is an object to define the max disruption that can + /// be caused to a collection of pods + /// + public partial class V1beta1PodDisruptionBudget + { + /// + /// Initializes a new instance of the V1beta1PodDisruptionBudget class. + /// + public V1beta1PodDisruptionBudget() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1PodDisruptionBudget class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Specification of the desired behavior of the + /// PodDisruptionBudget. + /// Most recently observed status of the + /// PodDisruptionBudget. + public V1beta1PodDisruptionBudget(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1PodDisruptionBudgetSpec spec = default(V1beta1PodDisruptionBudgetSpec), V1beta1PodDisruptionBudgetStatus status = default(V1beta1PodDisruptionBudgetStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets specification of the desired behavior of the + /// PodDisruptionBudget. + /// + [JsonProperty(PropertyName = "spec")] + public V1beta1PodDisruptionBudgetSpec Spec { get; set; } + + /// + /// Gets or sets most recently observed status of the + /// PodDisruptionBudget. + /// + [JsonProperty(PropertyName = "status")] + public V1beta1PodDisruptionBudgetStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1PodDisruptionBudgetList.cs b/src/generated/Models/V1beta1PodDisruptionBudgetList.cs new file mode 100755 index 000000000..7ad2753d2 --- /dev/null +++ b/src/generated/Models/V1beta1PodDisruptionBudgetList.cs @@ -0,0 +1,109 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. + /// + public partial class V1beta1PodDisruptionBudgetList + { + /// + /// Initializes a new instance of the V1beta1PodDisruptionBudgetList + /// class. + /// + public V1beta1PodDisruptionBudgetList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1PodDisruptionBudgetList + /// class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1beta1PodDisruptionBudgetList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1PodDisruptionBudgetSpec.cs b/src/generated/Models/V1beta1PodDisruptionBudgetSpec.cs new file mode 100755 index 000000000..071fb38dd --- /dev/null +++ b/src/generated/Models/V1beta1PodDisruptionBudgetSpec.cs @@ -0,0 +1,64 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. + /// + public partial class V1beta1PodDisruptionBudgetSpec + { + /// + /// Initializes a new instance of the V1beta1PodDisruptionBudgetSpec + /// class. + /// + public V1beta1PodDisruptionBudgetSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1PodDisruptionBudgetSpec + /// class. + /// + /// An eviction is allowed if at least + /// "minAvailable" pods selected by "selector" will still be available + /// after the eviction, i.e. even in the absence of the evicted pod. + /// So for example you can prevent all voluntary evictions by + /// specifying "100%". + /// Label query over pods whose evictions are + /// managed by the disruption budget. + public V1beta1PodDisruptionBudgetSpec(string minAvailable = default(string), V1LabelSelector selector = default(V1LabelSelector)) + { + MinAvailable = minAvailable; + Selector = selector; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an eviction is allowed if at least "minAvailable" pods + /// selected by "selector" will still be available after the eviction, + /// i.e. even in the absence of the evicted pod. So for example you + /// can prevent all voluntary evictions by specifying "100%". + /// + [JsonProperty(PropertyName = "minAvailable")] + public string MinAvailable { get; set; } + + /// + /// Gets or sets label query over pods whose evictions are managed by + /// the disruption budget. + /// + [JsonProperty(PropertyName = "selector")] + public V1LabelSelector Selector { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1PodDisruptionBudgetStatus.cs b/src/generated/Models/V1beta1PodDisruptionBudgetStatus.cs new file mode 100755 index 000000000..47015570b --- /dev/null +++ b/src/generated/Models/V1beta1PodDisruptionBudgetStatus.cs @@ -0,0 +1,137 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PodDisruptionBudgetStatus represents information about the status of a + /// PodDisruptionBudget. Status may trail the actual state of a system. + /// + public partial class V1beta1PodDisruptionBudgetStatus + { + /// + /// Initializes a new instance of the V1beta1PodDisruptionBudgetStatus + /// class. + /// + public V1beta1PodDisruptionBudgetStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1PodDisruptionBudgetStatus + /// class. + /// + /// current number of healthy pods + /// minimum desired number of healthy + /// pods + /// DisruptedPods contains information + /// about pods whose eviction was processed by the API server eviction + /// subresource handler but has not yet been observed by the + /// PodDisruptionBudget controller. A pod will be in this map from the + /// time when the API server processed the eviction request to the time + /// when the pod is seen by PDB controller as having been marked for + /// deletion (or after a timeout). The key in the map is the name of + /// the pod and the value is the time when the API server processed the + /// eviction request. If the deletion didn't occur and a pod is still + /// there it will be removed from the list automatically by + /// PodDisruptionBudget controller after some time. If everything goes + /// smooth this map should be empty for the most of the time. Large + /// number of entries in the map may indicate problems with pod + /// deletions. + /// Number of pod disruptions that are + /// currently allowed. + /// total number of pods counted by this + /// disruption budget + /// Most recent generation observed + /// when updating this PDB status. PodDisruptionsAllowed and other + /// status informatio is valid only if observedGeneration equals to + /// PDB's object generation. + public V1beta1PodDisruptionBudgetStatus(int currentHealthy, int desiredHealthy, IDictionary disruptedPods, int disruptionsAllowed, int expectedPods, long? observedGeneration = default(long?)) + { + CurrentHealthy = currentHealthy; + DesiredHealthy = desiredHealthy; + DisruptedPods = disruptedPods; + DisruptionsAllowed = disruptionsAllowed; + ExpectedPods = expectedPods; + ObservedGeneration = observedGeneration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets current number of healthy pods + /// + [JsonProperty(PropertyName = "currentHealthy")] + public int CurrentHealthy { get; set; } + + /// + /// Gets or sets minimum desired number of healthy pods + /// + [JsonProperty(PropertyName = "desiredHealthy")] + public int DesiredHealthy { get; set; } + + /// + /// Gets or sets disruptedPods contains information about pods whose + /// eviction was processed by the API server eviction subresource + /// handler but has not yet been observed by the PodDisruptionBudget + /// controller. A pod will be in this map from the time when the API + /// server processed the eviction request to the time when the pod is + /// seen by PDB controller as having been marked for deletion (or after + /// a timeout). The key in the map is the name of the pod and the value + /// is the time when the API server processed the eviction request. If + /// the deletion didn't occur and a pod is still there it will be + /// removed from the list automatically by PodDisruptionBudget + /// controller after some time. If everything goes smooth this map + /// should be empty for the most of the time. Large number of entries + /// in the map may indicate problems with pod deletions. + /// + [JsonProperty(PropertyName = "disruptedPods")] + public IDictionary DisruptedPods { get; set; } + + /// + /// Gets or sets number of pod disruptions that are currently allowed. + /// + [JsonProperty(PropertyName = "disruptionsAllowed")] + public int DisruptionsAllowed { get; set; } + + /// + /// Gets or sets total number of pods counted by this disruption budget + /// + [JsonProperty(PropertyName = "expectedPods")] + public int ExpectedPods { get; set; } + + /// + /// Gets or sets most recent generation observed when updating this PDB + /// status. PodDisruptionsAllowed and other status informatio is valid + /// only if observedGeneration equals to PDB's object generation. + /// + [JsonProperty(PropertyName = "observedGeneration")] + public long? ObservedGeneration { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DisruptedPods == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DisruptedPods"); + } + } + } +} diff --git a/src/generated/Models/V1beta1PodSecurityPolicy.cs b/src/generated/Models/V1beta1PodSecurityPolicy.cs new file mode 100755 index 000000000..18ccfc8a4 --- /dev/null +++ b/src/generated/Models/V1beta1PodSecurityPolicy.cs @@ -0,0 +1,101 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Pod Security Policy governs the ability to make requests that affect + /// the Security Context that will be applied to a pod and container. + /// + public partial class V1beta1PodSecurityPolicy + { + /// + /// Initializes a new instance of the V1beta1PodSecurityPolicy class. + /// + public V1beta1PodSecurityPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1PodSecurityPolicy class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// spec defines the policy enforced. + public V1beta1PodSecurityPolicy(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1PodSecurityPolicySpec spec = default(V1beta1PodSecurityPolicySpec)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec defines the policy enforced. + /// + [JsonProperty(PropertyName = "spec")] + public V1beta1PodSecurityPolicySpec Spec { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1PodSecurityPolicyList.cs b/src/generated/Models/V1beta1PodSecurityPolicyList.cs new file mode 100755 index 000000000..80f1ae3ee --- /dev/null +++ b/src/generated/Models/V1beta1PodSecurityPolicyList.cs @@ -0,0 +1,115 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Pod Security Policy List is a list of PodSecurityPolicy objects. + /// + public partial class V1beta1PodSecurityPolicyList + { + /// + /// Initializes a new instance of the V1beta1PodSecurityPolicyList + /// class. + /// + public V1beta1PodSecurityPolicyList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1PodSecurityPolicyList + /// class. + /// + /// Items is a list of schema objects. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1beta1PodSecurityPolicyList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of schema objects. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1PodSecurityPolicySpec.cs b/src/generated/Models/V1beta1PodSecurityPolicySpec.cs new file mode 100755 index 000000000..0a32757b5 --- /dev/null +++ b/src/generated/Models/V1beta1PodSecurityPolicySpec.cs @@ -0,0 +1,248 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Pod Security Policy Spec defines the policy enforced. + /// + public partial class V1beta1PodSecurityPolicySpec + { + /// + /// Initializes a new instance of the V1beta1PodSecurityPolicySpec + /// class. + /// + public V1beta1PodSecurityPolicySpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1PodSecurityPolicySpec + /// class. + /// + /// FSGroup is the strategy that will dictate + /// what fs group is used by the SecurityContext. + /// runAsUser is the strategy that will dictate + /// the allowable RunAsUser values that may be set. + /// seLinux is the strategy that will dictate the + /// allowable labels that may be set. + /// SupplementalGroups is the strategy + /// that will dictate what supplemental groups are used by the + /// SecurityContext. + /// AllowedCapabilities is a list of + /// capabilities that can be requested to add to the container. + /// Capabilities in this field may be added at the pod author's + /// discretion. You must not list a capability in both + /// AllowedCapabilities and RequiredDropCapabilities. + /// DefaultAddCapabilities is the + /// default set of capabilities that will be added to the container + /// unless the pod spec specifically drops the capability. You may not + /// list a capabiility in both DefaultAddCapabilities and + /// RequiredDropCapabilities. + /// hostIPC determines if the policy allows the + /// use of HostIPC in the pod spec. + /// hostNetwork determines if the policy + /// allows the use of HostNetwork in the pod spec. + /// hostPID determines if the policy allows the + /// use of HostPID in the pod spec. + /// hostPorts determines which host port ranges + /// are allowed to be exposed. + /// privileged determines if a pod can request + /// to be run as privileged. + /// ReadOnlyRootFilesystem when + /// set to true will force containers to run with a read only root file + /// system. If the container specifically requests to run with a + /// non-read only root file system the PSP should deny the pod. If set + /// to false the container may run with a read only root file system if + /// it wishes but it will not be forced to. + /// RequiredDropCapabilities are + /// the capabilities that will be dropped from the container. These + /// are required to be dropped and cannot be added. + /// volumes is a white list of allowed volume + /// plugins. Empty indicates that all plugins may be used. + public V1beta1PodSecurityPolicySpec(V1beta1FSGroupStrategyOptions fsGroup, V1beta1RunAsUserStrategyOptions runAsUser, V1beta1SELinuxStrategyOptions seLinux, V1beta1SupplementalGroupsStrategyOptions supplementalGroups, IList allowedCapabilities = default(IList), IList defaultAddCapabilities = default(IList), bool? hostIPC = default(bool?), bool? hostNetwork = default(bool?), bool? hostPID = default(bool?), IList hostPorts = default(IList), bool? privileged = default(bool?), bool? readOnlyRootFilesystem = default(bool?), IList requiredDropCapabilities = default(IList), IList volumes = default(IList)) + { + AllowedCapabilities = allowedCapabilities; + DefaultAddCapabilities = defaultAddCapabilities; + FsGroup = fsGroup; + HostIPC = hostIPC; + HostNetwork = hostNetwork; + HostPID = hostPID; + HostPorts = hostPorts; + Privileged = privileged; + ReadOnlyRootFilesystem = readOnlyRootFilesystem; + RequiredDropCapabilities = requiredDropCapabilities; + RunAsUser = runAsUser; + SeLinux = seLinux; + SupplementalGroups = supplementalGroups; + Volumes = volumes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets allowedCapabilities is a list of capabilities that can + /// be requested to add to the container. Capabilities in this field + /// may be added at the pod author's discretion. You must not list a + /// capability in both AllowedCapabilities and + /// RequiredDropCapabilities. + /// + [JsonProperty(PropertyName = "allowedCapabilities")] + public IList AllowedCapabilities { get; set; } + + /// + /// Gets or sets defaultAddCapabilities is the default set of + /// capabilities that will be added to the container unless the pod + /// spec specifically drops the capability. You may not list a + /// capabiility in both DefaultAddCapabilities and + /// RequiredDropCapabilities. + /// + [JsonProperty(PropertyName = "defaultAddCapabilities")] + public IList DefaultAddCapabilities { get; set; } + + /// + /// Gets or sets fSGroup is the strategy that will dictate what fs + /// group is used by the SecurityContext. + /// + [JsonProperty(PropertyName = "fsGroup")] + public V1beta1FSGroupStrategyOptions FsGroup { get; set; } + + /// + /// Gets or sets hostIPC determines if the policy allows the use of + /// HostIPC in the pod spec. + /// + [JsonProperty(PropertyName = "hostIPC")] + public bool? HostIPC { get; set; } + + /// + /// Gets or sets hostNetwork determines if the policy allows the use of + /// HostNetwork in the pod spec. + /// + [JsonProperty(PropertyName = "hostNetwork")] + public bool? HostNetwork { get; set; } + + /// + /// Gets or sets hostPID determines if the policy allows the use of + /// HostPID in the pod spec. + /// + [JsonProperty(PropertyName = "hostPID")] + public bool? HostPID { get; set; } + + /// + /// Gets or sets hostPorts determines which host port ranges are + /// allowed to be exposed. + /// + [JsonProperty(PropertyName = "hostPorts")] + public IList HostPorts { get; set; } + + /// + /// Gets or sets privileged determines if a pod can request to be run + /// as privileged. + /// + [JsonProperty(PropertyName = "privileged")] + public bool? Privileged { get; set; } + + /// + /// Gets or sets readOnlyRootFilesystem when set to true will force + /// containers to run with a read only root file system. If the + /// container specifically requests to run with a non-read only root + /// file system the PSP should deny the pod. If set to false the + /// container may run with a read only root file system if it wishes + /// but it will not be forced to. + /// + [JsonProperty(PropertyName = "readOnlyRootFilesystem")] + public bool? ReadOnlyRootFilesystem { get; set; } + + /// + /// Gets or sets requiredDropCapabilities are the capabilities that + /// will be dropped from the container. These are required to be + /// dropped and cannot be added. + /// + [JsonProperty(PropertyName = "requiredDropCapabilities")] + public IList RequiredDropCapabilities { get; set; } + + /// + /// Gets or sets runAsUser is the strategy that will dictate the + /// allowable RunAsUser values that may be set. + /// + [JsonProperty(PropertyName = "runAsUser")] + public V1beta1RunAsUserStrategyOptions RunAsUser { get; set; } + + /// + /// Gets or sets seLinux is the strategy that will dictate the + /// allowable labels that may be set. + /// + [JsonProperty(PropertyName = "seLinux")] + public V1beta1SELinuxStrategyOptions SeLinux { get; set; } + + /// + /// Gets or sets supplementalGroups is the strategy that will dictate + /// what supplemental groups are used by the SecurityContext. + /// + [JsonProperty(PropertyName = "supplementalGroups")] + public V1beta1SupplementalGroupsStrategyOptions SupplementalGroups { get; set; } + + /// + /// Gets or sets volumes is a white list of allowed volume plugins. + /// Empty indicates that all plugins may be used. + /// + [JsonProperty(PropertyName = "volumes")] + public IList Volumes { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (FsGroup == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "FsGroup"); + } + if (RunAsUser == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RunAsUser"); + } + if (SeLinux == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SeLinux"); + } + if (SupplementalGroups == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SupplementalGroups"); + } + if (HostPorts != null) + { + foreach (var element in HostPorts) + { + if (element != null) + { + element.Validate(); + } + } + } + if (RunAsUser != null) + { + RunAsUser.Validate(); + } + if (SeLinux != null) + { + SeLinux.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1PolicyRule.cs b/src/generated/Models/V1beta1PolicyRule.cs new file mode 100755 index 000000000..7ae22d420 --- /dev/null +++ b/src/generated/Models/V1beta1PolicyRule.cs @@ -0,0 +1,123 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PolicyRule holds information that describes a policy rule, but does not + /// contain information about who the rule applies to or which namespace + /// the rule applies to. + /// + public partial class V1beta1PolicyRule + { + /// + /// Initializes a new instance of the V1beta1PolicyRule class. + /// + public V1beta1PolicyRule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1PolicyRule class. + /// + /// Verbs is a list of Verbs that apply to ALL the + /// ResourceKinds and AttributeRestrictions contained in this rule. + /// VerbAll represents all kinds. + /// APIGroups is the name of the APIGroup that + /// contains the resources. If multiple API groups are specified, any + /// action requested against one of the enumerated resources in any API + /// group will be allowed. + /// NonResourceURLs is a set of partial + /// urls that a user should have access to. *s are allowed, but only + /// as the full, final step in the path Since non-resource URLs are not + /// namespaced, this field is only applicable for ClusterRoles + /// referenced from a ClusterRoleBinding. Rules can either apply to API + /// resources (such as "pods" or "secrets") or non-resource URL paths + /// (such as "/api"), but not both. + /// ResourceNames is an optional white list + /// of names that the rule applies to. An empty set means that + /// everything is allowed. + /// Resources is a list of resources this rule + /// applies to. ResourceAll represents all resources. + public V1beta1PolicyRule(IList verbs, IList apiGroups = default(IList), IList nonResourceURLs = default(IList), IList resourceNames = default(IList), IList resources = default(IList)) + { + ApiGroups = apiGroups; + NonResourceURLs = nonResourceURLs; + ResourceNames = resourceNames; + Resources = resources; + Verbs = verbs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIGroups is the name of the APIGroup that contains + /// the resources. If multiple API groups are specified, any action + /// requested against one of the enumerated resources in any API group + /// will be allowed. + /// + [JsonProperty(PropertyName = "apiGroups")] + public IList ApiGroups { get; set; } + + /// + /// Gets or sets nonResourceURLs is a set of partial urls that a user + /// should have access to. *s are allowed, but only as the full, final + /// step in the path Since non-resource URLs are not namespaced, this + /// field is only applicable for ClusterRoles referenced from a + /// ClusterRoleBinding. Rules can either apply to API resources (such + /// as "pods" or "secrets") or non-resource URL paths (such as "/api"), + /// but not both. + /// + [JsonProperty(PropertyName = "nonResourceURLs")] + public IList NonResourceURLs { get; set; } + + /// + /// Gets or sets resourceNames is an optional white list of names that + /// the rule applies to. An empty set means that everything is + /// allowed. + /// + [JsonProperty(PropertyName = "resourceNames")] + public IList ResourceNames { get; set; } + + /// + /// Gets or sets resources is a list of resources this rule applies to. + /// ResourceAll represents all resources. + /// + [JsonProperty(PropertyName = "resources")] + public IList Resources { get; set; } + + /// + /// Gets or sets verbs is a list of Verbs that apply to ALL the + /// ResourceKinds and AttributeRestrictions contained in this rule. + /// VerbAll represents all kinds. + /// + [JsonProperty(PropertyName = "verbs")] + public IList Verbs { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Verbs == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Verbs"); + } + } + } +} diff --git a/src/generated/Models/V1beta1ReplicaSet.cs b/src/generated/Models/V1beta1ReplicaSet.cs new file mode 100755 index 000000000..cdab16198 --- /dev/null +++ b/src/generated/Models/V1beta1ReplicaSet.cs @@ -0,0 +1,126 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ReplicaSet represents the configuration of a ReplicaSet. + /// + public partial class V1beta1ReplicaSet + { + /// + /// Initializes a new instance of the V1beta1ReplicaSet class. + /// + public V1beta1ReplicaSet() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1ReplicaSet class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// If the Labels of a ReplicaSet are empty, + /// they are defaulted to be the same as the Pod(s) that the ReplicaSet + /// manages. Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Spec defines the specification of the desired + /// behavior of the ReplicaSet. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// Status is the most recently observed status of + /// the ReplicaSet. This data may be out of date by some window of + /// time. Populated by the system. Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V1beta1ReplicaSet(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1ReplicaSetSpec spec = default(V1beta1ReplicaSetSpec), V1beta1ReplicaSetStatus status = default(V1beta1ReplicaSetStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets if the Labels of a ReplicaSet are empty, they are + /// defaulted to be the same as the Pod(s) that the ReplicaSet manages. + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec defines the specification of the desired behavior + /// of the ReplicaSet. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1beta1ReplicaSetSpec Spec { get; set; } + + /// + /// Gets or sets status is the most recently observed status of the + /// ReplicaSet. This data may be out of date by some window of time. + /// Populated by the system. Read-only. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "status")] + public V1beta1ReplicaSetStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1ReplicaSetCondition.cs b/src/generated/Models/V1beta1ReplicaSetCondition.cs new file mode 100755 index 000000000..ffc01d898 --- /dev/null +++ b/src/generated/Models/V1beta1ReplicaSetCondition.cs @@ -0,0 +1,102 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ReplicaSetCondition describes the state of a replica set at a certain + /// point. + /// + public partial class V1beta1ReplicaSetCondition + { + /// + /// Initializes a new instance of the V1beta1ReplicaSetCondition class. + /// + public V1beta1ReplicaSetCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1ReplicaSetCondition class. + /// + /// Status of the condition, one of True, False, + /// Unknown. + /// Type of replica set condition. + /// The last time the condition + /// transitioned from one status to another. + /// A human readable message indicating details + /// about the transition. + /// The reason for the condition's last + /// transition. + public V1beta1ReplicaSetCondition(string status, string type, System.DateTime? lastTransitionTime = default(System.DateTime?), string message = default(string), string reason = default(string)) + { + LastTransitionTime = lastTransitionTime; + Message = message; + Reason = reason; + Status = status; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the last time the condition transitioned from one + /// status to another. + /// + [JsonProperty(PropertyName = "lastTransitionTime")] + public System.DateTime? LastTransitionTime { get; set; } + + /// + /// Gets or sets a human readable message indicating details about the + /// transition. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets the reason for the condition's last transition. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Gets or sets status of the condition, one of True, False, Unknown. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets type of replica set condition. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Status == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Status"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/src/generated/Models/V1beta1ReplicaSetList.cs b/src/generated/Models/V1beta1ReplicaSetList.cs new file mode 100755 index 000000000..62677b5e9 --- /dev/null +++ b/src/generated/Models/V1beta1ReplicaSetList.cs @@ -0,0 +1,115 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ReplicaSetList is a collection of ReplicaSets. + /// + public partial class V1beta1ReplicaSetList + { + /// + /// Initializes a new instance of the V1beta1ReplicaSetList class. + /// + public V1beta1ReplicaSetList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1ReplicaSetList class. + /// + /// List of ReplicaSets. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1beta1ReplicaSetList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets list of ReplicaSets. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1ReplicaSetSpec.cs b/src/generated/Models/V1beta1ReplicaSetSpec.cs new file mode 100755 index 000000000..dad39dd8d --- /dev/null +++ b/src/generated/Models/V1beta1ReplicaSetSpec.cs @@ -0,0 +1,108 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ReplicaSetSpec is the specification of a ReplicaSet. + /// + public partial class V1beta1ReplicaSetSpec + { + /// + /// Initializes a new instance of the V1beta1ReplicaSetSpec class. + /// + public V1beta1ReplicaSetSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1ReplicaSetSpec class. + /// + /// Minimum number of seconds for which a + /// newly created pod should be ready without any of its container + /// crashing, for it to be considered available. Defaults to 0 (pod + /// will be considered available as soon as it is ready) + /// Replicas is the number of desired replicas. + /// This is a pointer to distinguish between explicit zero and + /// unspecified. Defaults to 1. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller + /// Selector is a label query over pods that + /// should match the replica count. If the selector is empty, it is + /// defaulted to the labels present on the pod template. Label keys and + /// values that must match in order to be controlled by this replica + /// set. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// Template is the object that describes the + /// pod that will be created if insufficient replicas are detected. + /// More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#pod-template + public V1beta1ReplicaSetSpec(int? minReadySeconds = default(int?), int? replicas = default(int?), V1LabelSelector selector = default(V1LabelSelector), V1PodTemplateSpec template = default(V1PodTemplateSpec)) + { + MinReadySeconds = minReadySeconds; + Replicas = replicas; + Selector = selector; + Template = template; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets minimum number of seconds for which a newly created + /// pod should be ready without any of its container crashing, for it + /// to be considered available. Defaults to 0 (pod will be considered + /// available as soon as it is ready) + /// + [JsonProperty(PropertyName = "minReadySeconds")] + public int? MinReadySeconds { get; set; } + + /// + /// Gets or sets replicas is the number of desired replicas. This is a + /// pointer to distinguish between explicit zero and unspecified. + /// Defaults to 1. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller + /// + [JsonProperty(PropertyName = "replicas")] + public int? Replicas { get; set; } + + /// + /// Gets or sets selector is a label query over pods that should match + /// the replica count. If the selector is empty, it is defaulted to the + /// labels present on the pod template. Label keys and values that must + /// match in order to be controlled by this replica set. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// + [JsonProperty(PropertyName = "selector")] + public V1LabelSelector Selector { get; set; } + + /// + /// Gets or sets template is the object that describes the pod that + /// will be created if insufficient replicas are detected. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#pod-template + /// + [JsonProperty(PropertyName = "template")] + public V1PodTemplateSpec Template { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Template != null) + { + Template.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1ReplicaSetStatus.cs b/src/generated/Models/V1beta1ReplicaSetStatus.cs new file mode 100755 index 000000000..40b5eeea3 --- /dev/null +++ b/src/generated/Models/V1beta1ReplicaSetStatus.cs @@ -0,0 +1,120 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ReplicaSetStatus represents the current status of a ReplicaSet. + /// + public partial class V1beta1ReplicaSetStatus + { + /// + /// Initializes a new instance of the V1beta1ReplicaSetStatus class. + /// + public V1beta1ReplicaSetStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1ReplicaSetStatus class. + /// + /// Replicas is the most recently oberved number + /// of replicas. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller + /// The number of available replicas + /// (ready for at least minReadySeconds) for this replica set. + /// Represents the latest available + /// observations of a replica set's current state. + /// The number of pods that have + /// labels matching the labels of the pod template of the + /// replicaset. + /// ObservedGeneration reflects the + /// generation of the most recently observed ReplicaSet. + /// The number of ready replicas for this + /// replica set. + public V1beta1ReplicaSetStatus(int replicas, int? availableReplicas = default(int?), IList conditions = default(IList), int? fullyLabeledReplicas = default(int?), long? observedGeneration = default(long?), int? readyReplicas = default(int?)) + { + AvailableReplicas = availableReplicas; + Conditions = conditions; + FullyLabeledReplicas = fullyLabeledReplicas; + ObservedGeneration = observedGeneration; + ReadyReplicas = readyReplicas; + Replicas = replicas; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the number of available replicas (ready for at least + /// minReadySeconds) for this replica set. + /// + [JsonProperty(PropertyName = "availableReplicas")] + public int? AvailableReplicas { get; set; } + + /// + /// Gets or sets represents the latest available observations of a + /// replica set's current state. + /// + [JsonProperty(PropertyName = "conditions")] + public IList Conditions { get; set; } + + /// + /// Gets or sets the number of pods that have labels matching the + /// labels of the pod template of the replicaset. + /// + [JsonProperty(PropertyName = "fullyLabeledReplicas")] + public int? FullyLabeledReplicas { get; set; } + + /// + /// Gets or sets observedGeneration reflects the generation of the most + /// recently observed ReplicaSet. + /// + [JsonProperty(PropertyName = "observedGeneration")] + public long? ObservedGeneration { get; set; } + + /// + /// Gets or sets the number of ready replicas for this replica set. + /// + [JsonProperty(PropertyName = "readyReplicas")] + public int? ReadyReplicas { get; set; } + + /// + /// Gets or sets replicas is the most recently oberved number of + /// replicas. More info: + /// http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller + /// + [JsonProperty(PropertyName = "replicas")] + public int Replicas { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Conditions != null) + { + foreach (var element in Conditions) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1ResourceAttributes.cs b/src/generated/Models/V1beta1ResourceAttributes.cs new file mode 100755 index 000000000..aa1d3dfa0 --- /dev/null +++ b/src/generated/Models/V1beta1ResourceAttributes.cs @@ -0,0 +1,118 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// ResourceAttributes includes the authorization attributes available for + /// resource requests to the Authorizer interface + /// + public partial class V1beta1ResourceAttributes + { + /// + /// Initializes a new instance of the V1beta1ResourceAttributes class. + /// + public V1beta1ResourceAttributes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1ResourceAttributes class. + /// + /// Group is the API Group of the Resource. "*" + /// means all. + /// Name is the name of the resource being requested + /// for a "get" or deleted for a "delete". "" (empty) means + /// all. + /// Namespace is the namespace of the + /// action being requested. Currently, there is no distinction between + /// no namespace and all namespaces "" (empty) is defaulted for + /// LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped + /// resources "" (empty) means "all" for namespace scoped resources + /// from a SubjectAccessReview or SelfSubjectAccessReview + /// Resource is one of the existing resource + /// types. "*" means all. + /// Subresource is one of the existing + /// resource types. "" means none. + /// Verb is a kubernetes resource API verb, like: + /// get, list, watch, create, update, delete, proxy. "*" means + /// all. + /// Version is the API Version of the Resource. + /// "*" means all. + public V1beta1ResourceAttributes(string group = default(string), string name = default(string), string namespaceProperty = default(string), string resource = default(string), string subresource = default(string), string verb = default(string), string version = default(string)) + { + Group = group; + Name = name; + NamespaceProperty = namespaceProperty; + Resource = resource; + Subresource = subresource; + Verb = verb; + Version = version; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets group is the API Group of the Resource. "*" means + /// all. + /// + [JsonProperty(PropertyName = "group")] + public string Group { get; set; } + + /// + /// Gets or sets name is the name of the resource being requested for a + /// "get" or deleted for a "delete". "" (empty) means all. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets namespace is the namespace of the action being + /// requested. Currently, there is no distinction between no namespace + /// and all namespaces "" (empty) is defaulted for + /// LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped + /// resources "" (empty) means "all" for namespace scoped resources + /// from a SubjectAccessReview or SelfSubjectAccessReview + /// + [JsonProperty(PropertyName = "namespace")] + public string NamespaceProperty { get; set; } + + /// + /// Gets or sets resource is one of the existing resource types. "*" + /// means all. + /// + [JsonProperty(PropertyName = "resource")] + public string Resource { get; set; } + + /// + /// Gets or sets subresource is one of the existing resource types. "" + /// means none. + /// + [JsonProperty(PropertyName = "subresource")] + public string Subresource { get; set; } + + /// + /// Gets or sets verb is a kubernetes resource API verb, like: get, + /// list, watch, create, update, delete, proxy. "*" means all. + /// + [JsonProperty(PropertyName = "verb")] + public string Verb { get; set; } + + /// + /// Gets or sets version is the API Version of the Resource. "*" means + /// all. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1Role.cs b/src/generated/Models/V1beta1Role.cs new file mode 100755 index 000000000..c15e933cb --- /dev/null +++ b/src/generated/Models/V1beta1Role.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Role is a namespaced, logical grouping of PolicyRules that can be + /// referenced as a unit by a RoleBinding. + /// + public partial class V1beta1Role + { + /// + /// Initializes a new instance of the V1beta1Role class. + /// + public V1beta1Role() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1Role class. + /// + /// Rules holds all the PolicyRules for this + /// Role + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1beta1Role(IList rules, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Rules = rules; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets rules holds all the PolicyRules for this Role + /// + [JsonProperty(PropertyName = "rules")] + public IList Rules { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Rules == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Rules"); + } + if (Rules != null) + { + foreach (var element in Rules) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1RoleBinding.cs b/src/generated/Models/V1beta1RoleBinding.cs new file mode 100755 index 000000000..fe63809a6 --- /dev/null +++ b/src/generated/Models/V1beta1RoleBinding.cs @@ -0,0 +1,137 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// RoleBinding references a role, but does not contain it. It can + /// reference a Role in the same namespace or a ClusterRole in the global + /// namespace. It adds who information via Subjects and namespace + /// information by which namespace it exists in. RoleBindings in a given + /// namespace only have effect in that namespace. + /// + public partial class V1beta1RoleBinding + { + /// + /// Initializes a new instance of the V1beta1RoleBinding class. + /// + public V1beta1RoleBinding() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1RoleBinding class. + /// + /// RoleRef can reference a Role in the current + /// namespace or a ClusterRole in the global namespace. If the RoleRef + /// cannot be resolved, the Authorizer must return an error. + /// Subjects holds references to the objects the + /// role applies to. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1beta1RoleBinding(V1beta1RoleRef roleRef, IList subjects, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + RoleRef = roleRef; + Subjects = subjects; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets roleRef can reference a Role in the current namespace + /// or a ClusterRole in the global namespace. If the RoleRef cannot be + /// resolved, the Authorizer must return an error. + /// + [JsonProperty(PropertyName = "roleRef")] + public V1beta1RoleRef RoleRef { get; set; } + + /// + /// Gets or sets subjects holds references to the objects the role + /// applies to. + /// + [JsonProperty(PropertyName = "subjects")] + public IList Subjects { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (RoleRef == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RoleRef"); + } + if (Subjects == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Subjects"); + } + if (RoleRef != null) + { + RoleRef.Validate(); + } + if (Subjects != null) + { + foreach (var element in Subjects) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1RoleBindingList.cs b/src/generated/Models/V1beta1RoleBindingList.cs new file mode 100755 index 000000000..4982529ca --- /dev/null +++ b/src/generated/Models/V1beta1RoleBindingList.cs @@ -0,0 +1,111 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// RoleBindingList is a collection of RoleBindings + /// + public partial class V1beta1RoleBindingList + { + /// + /// Initializes a new instance of the V1beta1RoleBindingList class. + /// + public V1beta1RoleBindingList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1RoleBindingList class. + /// + /// Items is a list of RoleBindings + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1beta1RoleBindingList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of RoleBindings + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1RoleList.cs b/src/generated/Models/V1beta1RoleList.cs new file mode 100755 index 000000000..ac7bf7436 --- /dev/null +++ b/src/generated/Models/V1beta1RoleList.cs @@ -0,0 +1,111 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// RoleList is a collection of Roles + /// + public partial class V1beta1RoleList + { + /// + /// Initializes a new instance of the V1beta1RoleList class. + /// + public V1beta1RoleList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1RoleList class. + /// + /// Items is a list of Roles + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. + public V1beta1RoleList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is a list of Roles + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1RoleRef.cs b/src/generated/Models/V1beta1RoleRef.cs new file mode 100755 index 000000000..9b4402d02 --- /dev/null +++ b/src/generated/Models/V1beta1RoleRef.cs @@ -0,0 +1,87 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// RoleRef contains information that points to the role being used + /// + public partial class V1beta1RoleRef + { + /// + /// Initializes a new instance of the V1beta1RoleRef class. + /// + public V1beta1RoleRef() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1RoleRef class. + /// + /// APIGroup is the group for the resource being + /// referenced + /// Kind is the type of resource being + /// referenced + /// Name is the name of resource being + /// referenced + public V1beta1RoleRef(string apiGroup, string kind, string name) + { + ApiGroup = apiGroup; + Kind = kind; + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIGroup is the group for the resource being + /// referenced + /// + [JsonProperty(PropertyName = "apiGroup")] + public string ApiGroup { get; set; } + + /// + /// Gets or sets kind is the type of resource being referenced + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets name is the name of resource being referenced + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ApiGroup == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ApiGroup"); + } + if (Kind == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/src/generated/Models/V1beta1RollingUpdateDaemonSet.cs b/src/generated/Models/V1beta1RollingUpdateDaemonSet.cs new file mode 100755 index 000000000..c9e68eb58 --- /dev/null +++ b/src/generated/Models/V1beta1RollingUpdateDaemonSet.cs @@ -0,0 +1,73 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Spec to control the desired behavior of daemon set rolling update. + /// + public partial class V1beta1RollingUpdateDaemonSet + { + /// + /// Initializes a new instance of the V1beta1RollingUpdateDaemonSet + /// class. + /// + public V1beta1RollingUpdateDaemonSet() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1RollingUpdateDaemonSet + /// class. + /// + /// The maximum number of DaemonSet pods + /// that can be unavailable during the update. Value can be an absolute + /// number (ex: 5) or a percentage of total number of DaemonSet pods at + /// the start of the update (ex: 10%). Absolute number is calculated + /// from percentage by rounding up. This cannot be 0. Default value is + /// 1. Example: when this is set to 30%, at most 30% of the total + /// number of nodes that should be running the daemon pod (i.e. + /// status.desiredNumberScheduled) can have their pods stopped for an + /// update at any given time. The update starts by stopping at most 30% + /// of those DaemonSet pods and then brings up new DaemonSet pods in + /// their place. Once the new pods are available, it then proceeds onto + /// other DaemonSet pods, thus ensuring that at least 70% of original + /// number of DaemonSet pods are available at all times during the + /// update. + public V1beta1RollingUpdateDaemonSet(string maxUnavailable = default(string)) + { + MaxUnavailable = maxUnavailable; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the maximum number of DaemonSet pods that can be + /// unavailable during the update. Value can be an absolute number (ex: + /// 5) or a percentage of total number of DaemonSet pods at the start + /// of the update (ex: 10%). Absolute number is calculated from + /// percentage by rounding up. This cannot be 0. Default value is 1. + /// Example: when this is set to 30%, at most 30% of the total number + /// of nodes that should be running the daemon pod (i.e. + /// status.desiredNumberScheduled) can have their pods stopped for an + /// update at any given time. The update starts by stopping at most 30% + /// of those DaemonSet pods and then brings up new DaemonSet pods in + /// their place. Once the new pods are available, it then proceeds onto + /// other DaemonSet pods, thus ensuring that at least 70% of original + /// number of DaemonSet pods are available at all times during the + /// update. + /// + [JsonProperty(PropertyName = "maxUnavailable")] + public string MaxUnavailable { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1RunAsUserStrategyOptions.cs b/src/generated/Models/V1beta1RunAsUserStrategyOptions.cs new file mode 100755 index 000000000..131bcabe4 --- /dev/null +++ b/src/generated/Models/V1beta1RunAsUserStrategyOptions.cs @@ -0,0 +1,86 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Run A sUser Strategy Options defines the strategy type and any options + /// used to create the strategy. + /// + public partial class V1beta1RunAsUserStrategyOptions + { + /// + /// Initializes a new instance of the V1beta1RunAsUserStrategyOptions + /// class. + /// + public V1beta1RunAsUserStrategyOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1RunAsUserStrategyOptions + /// class. + /// + /// Rule is the strategy that will dictate the + /// allowable RunAsUser values that may be set. + /// Ranges are the allowed ranges of uids that may + /// be used. + public V1beta1RunAsUserStrategyOptions(string rule, IList ranges = default(IList)) + { + Ranges = ranges; + Rule = rule; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets ranges are the allowed ranges of uids that may be + /// used. + /// + [JsonProperty(PropertyName = "ranges")] + public IList Ranges { get; set; } + + /// + /// Gets or sets rule is the strategy that will dictate the allowable + /// RunAsUser values that may be set. + /// + [JsonProperty(PropertyName = "rule")] + public string Rule { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Rule == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Rule"); + } + if (Ranges != null) + { + foreach (var element in Ranges) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1SELinuxStrategyOptions.cs b/src/generated/Models/V1beta1SELinuxStrategyOptions.cs new file mode 100755 index 000000000..a0a498cd2 --- /dev/null +++ b/src/generated/Models/V1beta1SELinuxStrategyOptions.cs @@ -0,0 +1,76 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SELinux Strategy Options defines the strategy type and any options + /// used to create the strategy. + /// + public partial class V1beta1SELinuxStrategyOptions + { + /// + /// Initializes a new instance of the V1beta1SELinuxStrategyOptions + /// class. + /// + public V1beta1SELinuxStrategyOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1SELinuxStrategyOptions + /// class. + /// + /// type is the strategy that will dictate the + /// allowable labels that may be set. + /// seLinuxOptions required to run as; + /// required for MustRunAs More info: + /// http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context + public V1beta1SELinuxStrategyOptions(string rule, V1SELinuxOptions seLinuxOptions = default(V1SELinuxOptions)) + { + Rule = rule; + SeLinuxOptions = seLinuxOptions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets type is the strategy that will dictate the allowable + /// labels that may be set. + /// + [JsonProperty(PropertyName = "rule")] + public string Rule { get; set; } + + /// + /// Gets or sets seLinuxOptions required to run as; required for + /// MustRunAs More info: + /// http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context + /// + [JsonProperty(PropertyName = "seLinuxOptions")] + public V1SELinuxOptions SeLinuxOptions { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Rule == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Rule"); + } + } + } +} diff --git a/src/generated/Models/V1beta1SelfSubjectAccessReview.cs b/src/generated/Models/V1beta1SelfSubjectAccessReview.cs new file mode 100755 index 000000000..e36c5c28f --- /dev/null +++ b/src/generated/Models/V1beta1SelfSubjectAccessReview.cs @@ -0,0 +1,118 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SelfSubjectAccessReview checks whether or the current user can perform + /// an action. Not filling in a spec.namespace means "in all namespaces". + /// Self is a special case, because users should always be able to check + /// whether they can perform an action + /// + public partial class V1beta1SelfSubjectAccessReview + { + /// + /// Initializes a new instance of the V1beta1SelfSubjectAccessReview + /// class. + /// + public V1beta1SelfSubjectAccessReview() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1SelfSubjectAccessReview + /// class. + /// + /// Spec holds information about the request being + /// evaluated. user and groups must be empty + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Status is filled in by the server and + /// indicates whether the request is allowed or not + public V1beta1SelfSubjectAccessReview(V1beta1SelfSubjectAccessReviewSpec spec, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1SubjectAccessReviewStatus status = default(V1beta1SubjectAccessReviewStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec holds information about the request being + /// evaluated. user and groups must be empty + /// + [JsonProperty(PropertyName = "spec")] + public V1beta1SelfSubjectAccessReviewSpec Spec { get; set; } + + /// + /// Gets or sets status is filled in by the server and indicates + /// whether the request is allowed or not + /// + [JsonProperty(PropertyName = "status")] + public V1beta1SubjectAccessReviewStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Spec"); + } + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1SelfSubjectAccessReviewSpec.cs b/src/generated/Models/V1beta1SelfSubjectAccessReviewSpec.cs new file mode 100755 index 000000000..d66700edc --- /dev/null +++ b/src/generated/Models/V1beta1SelfSubjectAccessReviewSpec.cs @@ -0,0 +1,61 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// SelfSubjectAccessReviewSpec is a description of the access request. + /// Exactly one of ResourceAuthorizationAttributes and + /// NonResourceAuthorizationAttributes must be set + /// + public partial class V1beta1SelfSubjectAccessReviewSpec + { + /// + /// Initializes a new instance of the + /// V1beta1SelfSubjectAccessReviewSpec class. + /// + public V1beta1SelfSubjectAccessReviewSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V1beta1SelfSubjectAccessReviewSpec class. + /// + /// NonResourceAttributes describes + /// information for a non-resource access request + /// ResourceAuthorizationAttributes + /// describes information for a resource access request + public V1beta1SelfSubjectAccessReviewSpec(V1beta1NonResourceAttributes nonResourceAttributes = default(V1beta1NonResourceAttributes), V1beta1ResourceAttributes resourceAttributes = default(V1beta1ResourceAttributes)) + { + NonResourceAttributes = nonResourceAttributes; + ResourceAttributes = resourceAttributes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets nonResourceAttributes describes information for a + /// non-resource access request + /// + [JsonProperty(PropertyName = "nonResourceAttributes")] + public V1beta1NonResourceAttributes NonResourceAttributes { get; set; } + + /// + /// Gets or sets resourceAuthorizationAttributes describes information + /// for a resource access request + /// + [JsonProperty(PropertyName = "resourceAttributes")] + public V1beta1ResourceAttributes ResourceAttributes { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1StatefulSet.cs b/src/generated/Models/V1beta1StatefulSet.cs new file mode 100755 index 000000000..8cc4abbd4 --- /dev/null +++ b/src/generated/Models/V1beta1StatefulSet.cs @@ -0,0 +1,118 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// StatefulSet represents a set of pods with consistent identities. + /// Identities are defined as: + /// - Network: A single stable DNS and hostname. + /// - Storage: As many VolumeClaims as requested. + /// The StatefulSet guarantees that a given network identity will always + /// map to the same storage identity. + /// + public partial class V1beta1StatefulSet + { + /// + /// Initializes a new instance of the V1beta1StatefulSet class. + /// + public V1beta1StatefulSet() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1StatefulSet class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Spec defines the desired identities of pods in + /// this set. + /// Status is the current status of Pods in this + /// StatefulSet. This data may be out of date by some window of + /// time. + public V1beta1StatefulSet(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1StatefulSetSpec spec = default(V1beta1StatefulSetSpec), V1beta1StatefulSetStatus status = default(V1beta1StatefulSetStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec defines the desired identities of pods in this + /// set. + /// + [JsonProperty(PropertyName = "spec")] + public V1beta1StatefulSetSpec Spec { get; set; } + + /// + /// Gets or sets status is the current status of Pods in this + /// StatefulSet. This data may be out of date by some window of time. + /// + [JsonProperty(PropertyName = "status")] + public V1beta1StatefulSetStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1StatefulSetList.cs b/src/generated/Models/V1beta1StatefulSetList.cs new file mode 100755 index 000000000..2b1161b94 --- /dev/null +++ b/src/generated/Models/V1beta1StatefulSetList.cs @@ -0,0 +1,107 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// StatefulSetList is a collection of StatefulSets. + /// + public partial class V1beta1StatefulSetList + { + /// + /// Initializes a new instance of the V1beta1StatefulSetList class. + /// + public V1beta1StatefulSetList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1StatefulSetList class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + public V1beta1StatefulSetList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1StatefulSetSpec.cs b/src/generated/Models/V1beta1StatefulSetSpec.cs new file mode 100755 index 000000000..47cdab30f --- /dev/null +++ b/src/generated/Models/V1beta1StatefulSetSpec.cs @@ -0,0 +1,144 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A StatefulSetSpec is the specification of a StatefulSet. + /// + public partial class V1beta1StatefulSetSpec + { + /// + /// Initializes a new instance of the V1beta1StatefulSetSpec class. + /// + public V1beta1StatefulSetSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1StatefulSetSpec class. + /// + /// ServiceName is the name of the service + /// that governs this StatefulSet. This service must exist before the + /// StatefulSet, and is responsible for the network identity of the + /// set. Pods get DNS/hostnames that follow the pattern: + /// pod-specific-string.serviceName.default.svc.cluster.local where + /// "pod-specific-string" is managed by the StatefulSet + /// controller. + /// Template is the object that describes the + /// pod that will be created if insufficient replicas are detected. + /// Each pod stamped out by the StatefulSet will fulfill this Template, + /// but have a unique identity from the rest of the + /// StatefulSet. + /// Replicas is the desired number of replicas + /// of the given Template. These are replicas in the sense that they + /// are instantiations of the same Template, but individual replicas + /// also have a consistent identity. If unspecified, defaults to + /// 1. + /// Selector is a label query over pods that + /// should match the replica count. If empty, defaulted to labels on + /// the pod template. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// VolumeClaimTemplates is a list + /// of claims that pods are allowed to reference. The StatefulSet + /// controller is responsible for mapping network identities to claims + /// in a way that maintains the identity of a pod. Every claim in this + /// list must have at least one matching (by name) volumeMount in one + /// container in the template. A claim in this list takes precedence + /// over any volumes in the template, with the same name. + public V1beta1StatefulSetSpec(string serviceName, V1PodTemplateSpec template, int? replicas = default(int?), V1LabelSelector selector = default(V1LabelSelector), IList volumeClaimTemplates = default(IList)) + { + Replicas = replicas; + Selector = selector; + ServiceName = serviceName; + Template = template; + VolumeClaimTemplates = volumeClaimTemplates; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets replicas is the desired number of replicas of the + /// given Template. These are replicas in the sense that they are + /// instantiations of the same Template, but individual replicas also + /// have a consistent identity. If unspecified, defaults to 1. + /// + [JsonProperty(PropertyName = "replicas")] + public int? Replicas { get; set; } + + /// + /// Gets or sets selector is a label query over pods that should match + /// the replica count. If empty, defaulted to labels on the pod + /// template. More info: + /// http://kubernetes.io/docs/user-guide/labels#label-selectors + /// + [JsonProperty(PropertyName = "selector")] + public V1LabelSelector Selector { get; set; } + + /// + /// Gets or sets serviceName is the name of the service that governs + /// this StatefulSet. This service must exist before the StatefulSet, + /// and is responsible for the network identity of the set. Pods get + /// DNS/hostnames that follow the pattern: + /// pod-specific-string.serviceName.default.svc.cluster.local where + /// "pod-specific-string" is managed by the StatefulSet controller. + /// + [JsonProperty(PropertyName = "serviceName")] + public string ServiceName { get; set; } + + /// + /// Gets or sets template is the object that describes the pod that + /// will be created if insufficient replicas are detected. Each pod + /// stamped out by the StatefulSet will fulfill this Template, but have + /// a unique identity from the rest of the StatefulSet. + /// + [JsonProperty(PropertyName = "template")] + public V1PodTemplateSpec Template { get; set; } + + /// + /// Gets or sets volumeClaimTemplates is a list of claims that pods are + /// allowed to reference. The StatefulSet controller is responsible for + /// mapping network identities to claims in a way that maintains the + /// identity of a pod. Every claim in this list must have at least one + /// matching (by name) volumeMount in one container in the template. A + /// claim in this list takes precedence over any volumes in the + /// template, with the same name. + /// + [JsonProperty(PropertyName = "volumeClaimTemplates")] + public IList VolumeClaimTemplates { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServiceName"); + } + if (Template == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Template"); + } + if (Template != null) + { + Template.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1StatefulSetStatus.cs b/src/generated/Models/V1beta1StatefulSetStatus.cs new file mode 100755 index 000000000..1e830c904 --- /dev/null +++ b/src/generated/Models/V1beta1StatefulSetStatus.cs @@ -0,0 +1,65 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// StatefulSetStatus represents the current state of a StatefulSet. + /// + public partial class V1beta1StatefulSetStatus + { + /// + /// Initializes a new instance of the V1beta1StatefulSetStatus class. + /// + public V1beta1StatefulSetStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1StatefulSetStatus class. + /// + /// Replicas is the number of actual + /// replicas. + /// most recent generation observed by + /// this StatefulSet. + public V1beta1StatefulSetStatus(int replicas, long? observedGeneration = default(long?)) + { + ObservedGeneration = observedGeneration; + Replicas = replicas; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets most recent generation observed by this StatefulSet. + /// + [JsonProperty(PropertyName = "observedGeneration")] + public long? ObservedGeneration { get; set; } + + /// + /// Gets or sets replicas is the number of actual replicas. + /// + [JsonProperty(PropertyName = "replicas")] + public int Replicas { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1beta1StorageClass.cs b/src/generated/Models/V1beta1StorageClass.cs new file mode 100755 index 000000000..861c8d2eb --- /dev/null +++ b/src/generated/Models/V1beta1StorageClass.cs @@ -0,0 +1,119 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// StorageClass describes the parameters for a class of storage for which + /// PersistentVolumes can be dynamically provisioned. + /// + /// StorageClasses are non-namespaced; the name of the storage class + /// according to etcd is in ObjectMeta.Name. + /// + public partial class V1beta1StorageClass + { + /// + /// Initializes a new instance of the V1beta1StorageClass class. + /// + public V1beta1StorageClass() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1StorageClass class. + /// + /// Provisioner indicates the type of the + /// provisioner. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Parameters holds the parameters for the + /// provisioner that should create volumes of this storage + /// class. + public V1beta1StorageClass(string provisioner, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), IDictionary parameters = default(IDictionary)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Parameters = parameters; + Provisioner = provisioner; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets parameters holds the parameters for the provisioner + /// that should create volumes of this storage class. + /// + [JsonProperty(PropertyName = "parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Gets or sets provisioner indicates the type of the provisioner. + /// + [JsonProperty(PropertyName = "provisioner")] + public string Provisioner { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Provisioner == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Provisioner"); + } + } + } +} diff --git a/src/generated/Models/V1beta1StorageClassList.cs b/src/generated/Models/V1beta1StorageClassList.cs new file mode 100755 index 000000000..9edd3806d --- /dev/null +++ b/src/generated/Models/V1beta1StorageClassList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// StorageClassList is a collection of storage classes. + /// + public partial class V1beta1StorageClassList + { + /// + /// Initializes a new instance of the V1beta1StorageClassList class. + /// + public V1beta1StorageClassList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1StorageClassList class. + /// + /// Items is the list of StorageClasses + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V1beta1StorageClassList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is the list of StorageClasses + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V1beta1Subject.cs b/src/generated/Models/V1beta1Subject.cs new file mode 100755 index 000000000..62f0b0953 --- /dev/null +++ b/src/generated/Models/V1beta1Subject.cs @@ -0,0 +1,105 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Subject contains a reference to the object or user identities a role + /// binding applies to. This can either hold a direct API object + /// reference, or a value for non-objects such as user and group names. + /// + public partial class V1beta1Subject + { + /// + /// Initializes a new instance of the V1beta1Subject class. + /// + public V1beta1Subject() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1Subject class. + /// + /// Kind of object being referenced. Values defined + /// by this API group are "User", "Group", and "ServiceAccount". If the + /// Authorizer does not recognized the kind value, the Authorizer + /// should report an error. + /// Name of the object being referenced. + /// APIGroup holds the API group of the + /// referenced subject. Defaults to "" for ServiceAccount subjects. + /// Defaults to "rbac.authorization.k8s.io" for User and Group + /// subjects. + /// Namespace of the referenced object. + /// If the object kind is non-namespace, such as "User" or "Group", and + /// this value is not empty the Authorizer should report an + /// error. + public V1beta1Subject(string kind, string name, string apiGroup = default(string), string namespaceProperty = default(string)) + { + ApiGroup = apiGroup; + Kind = kind; + Name = name; + NamespaceProperty = namespaceProperty; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIGroup holds the API group of the referenced + /// subject. Defaults to "" for ServiceAccount subjects. Defaults to + /// "rbac.authorization.k8s.io" for User and Group subjects. + /// + [JsonProperty(PropertyName = "apiGroup")] + public string ApiGroup { get; set; } + + /// + /// Gets or sets kind of object being referenced. Values defined by + /// this API group are "User", "Group", and "ServiceAccount". If the + /// Authorizer does not recognized the kind value, the Authorizer + /// should report an error. + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets name of the object being referenced. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets namespace of the referenced object. If the object + /// kind is non-namespace, such as "User" or "Group", and this value is + /// not empty the Authorizer should report an error. + /// + [JsonProperty(PropertyName = "namespace")] + public string NamespaceProperty { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Kind == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/src/generated/Models/V1beta1SubjectAccessReview.cs b/src/generated/Models/V1beta1SubjectAccessReview.cs new file mode 100755 index 000000000..1b6221c9c --- /dev/null +++ b/src/generated/Models/V1beta1SubjectAccessReview.cs @@ -0,0 +1,114 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SubjectAccessReview checks whether or not a user or group can perform + /// an action. + /// + public partial class V1beta1SubjectAccessReview + { + /// + /// Initializes a new instance of the V1beta1SubjectAccessReview class. + /// + public V1beta1SubjectAccessReview() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1SubjectAccessReview class. + /// + /// Spec holds information about the request being + /// evaluated + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Status is filled in by the server and + /// indicates whether the request is allowed or not + public V1beta1SubjectAccessReview(V1beta1SubjectAccessReviewSpec spec, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1SubjectAccessReviewStatus status = default(V1beta1SubjectAccessReviewStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec holds information about the request being + /// evaluated + /// + [JsonProperty(PropertyName = "spec")] + public V1beta1SubjectAccessReviewSpec Spec { get; set; } + + /// + /// Gets or sets status is filled in by the server and indicates + /// whether the request is allowed or not + /// + [JsonProperty(PropertyName = "status")] + public V1beta1SubjectAccessReviewStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Spec"); + } + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V1beta1SubjectAccessReviewSpec.cs b/src/generated/Models/V1beta1SubjectAccessReviewSpec.cs new file mode 100755 index 000000000..4f6232e50 --- /dev/null +++ b/src/generated/Models/V1beta1SubjectAccessReviewSpec.cs @@ -0,0 +1,96 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SubjectAccessReviewSpec is a description of the access request. + /// Exactly one of ResourceAuthorizationAttributes and + /// NonResourceAuthorizationAttributes must be set + /// + public partial class V1beta1SubjectAccessReviewSpec + { + /// + /// Initializes a new instance of the V1beta1SubjectAccessReviewSpec + /// class. + /// + public V1beta1SubjectAccessReviewSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1SubjectAccessReviewSpec + /// class. + /// + /// Extra corresponds to the user.Info.GetExtra() + /// method from the authenticator. Since that is input to the + /// authorizer it needs a reflection here. + /// Groups is the groups you're testing + /// for. + /// NonResourceAttributes describes + /// information for a non-resource access request + /// ResourceAuthorizationAttributes + /// describes information for a resource access request + /// User is the user you're testing for. If you + /// specify "User" but not "Group", then is it interpreted as "What if + /// User were not a member of any groups + public V1beta1SubjectAccessReviewSpec(IDictionary> extra = default(IDictionary>), IList group = default(IList), V1beta1NonResourceAttributes nonResourceAttributes = default(V1beta1NonResourceAttributes), V1beta1ResourceAttributes resourceAttributes = default(V1beta1ResourceAttributes), string user = default(string)) + { + Extra = extra; + Group = group; + NonResourceAttributes = nonResourceAttributes; + ResourceAttributes = resourceAttributes; + User = user; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets extra corresponds to the user.Info.GetExtra() method + /// from the authenticator. Since that is input to the authorizer it + /// needs a reflection here. + /// + [JsonProperty(PropertyName = "extra")] + public IDictionary> Extra { get; set; } + + /// + /// Gets or sets groups is the groups you're testing for. + /// + [JsonProperty(PropertyName = "group")] + public IList Group { get; set; } + + /// + /// Gets or sets nonResourceAttributes describes information for a + /// non-resource access request + /// + [JsonProperty(PropertyName = "nonResourceAttributes")] + public V1beta1NonResourceAttributes NonResourceAttributes { get; set; } + + /// + /// Gets or sets resourceAuthorizationAttributes describes information + /// for a resource access request + /// + [JsonProperty(PropertyName = "resourceAttributes")] + public V1beta1ResourceAttributes ResourceAttributes { get; set; } + + /// + /// Gets or sets user is the user you're testing for. If you specify + /// "User" but not "Group", then is it interpreted as "What if User + /// were not a member of any groups + /// + [JsonProperty(PropertyName = "user")] + public string User { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1SubjectAccessReviewStatus.cs b/src/generated/Models/V1beta1SubjectAccessReviewStatus.cs new file mode 100755 index 000000000..8c7697b9e --- /dev/null +++ b/src/generated/Models/V1beta1SubjectAccessReviewStatus.cs @@ -0,0 +1,87 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// SubjectAccessReviewStatus + /// + public partial class V1beta1SubjectAccessReviewStatus + { + /// + /// Initializes a new instance of the V1beta1SubjectAccessReviewStatus + /// class. + /// + public V1beta1SubjectAccessReviewStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1SubjectAccessReviewStatus + /// class. + /// + /// Allowed is required. True if the action + /// would be allowed, false otherwise. + /// EvaluationError is an indication that + /// some error occurred during the authorization check. It is entirely + /// possible to get an error and be able to continue determine + /// authorization status in spite of it. For instance, RBAC can be + /// missing a role, but enough roles are still present and bound to + /// reason about the request. + /// Reason is optional. It indicates why a + /// request was allowed or denied. + public V1beta1SubjectAccessReviewStatus(bool allowed, string evaluationError = default(string), string reason = default(string)) + { + Allowed = allowed; + EvaluationError = evaluationError; + Reason = reason; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets allowed is required. True if the action would be + /// allowed, false otherwise. + /// + [JsonProperty(PropertyName = "allowed")] + public bool Allowed { get; set; } + + /// + /// Gets or sets evaluationError is an indication that some error + /// occurred during the authorization check. It is entirely possible to + /// get an error and be able to continue determine authorization status + /// in spite of it. For instance, RBAC can be missing a role, but + /// enough roles are still present and bound to reason about the + /// request. + /// + [JsonProperty(PropertyName = "evaluationError")] + public string EvaluationError { get; set; } + + /// + /// Gets or sets reason is optional. It indicates why a request was + /// allowed or denied. + /// + [JsonProperty(PropertyName = "reason")] + public string Reason { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + //Nothing to validate + } + } +} diff --git a/src/generated/Models/V1beta1SupplementalGroupsStrategyOptions.cs b/src/generated/Models/V1beta1SupplementalGroupsStrategyOptions.cs new file mode 100755 index 000000000..d66afbbe5 --- /dev/null +++ b/src/generated/Models/V1beta1SupplementalGroupsStrategyOptions.cs @@ -0,0 +1,64 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SupplementalGroupsStrategyOptions defines the strategy type and options + /// used to create the strategy. + /// + public partial class V1beta1SupplementalGroupsStrategyOptions + { + /// + /// Initializes a new instance of the + /// V1beta1SupplementalGroupsStrategyOptions class. + /// + public V1beta1SupplementalGroupsStrategyOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V1beta1SupplementalGroupsStrategyOptions class. + /// + /// Ranges are the allowed ranges of supplemental + /// groups. If you would like to force a single supplemental group + /// then supply a single range with the same start and end. + /// Rule is the strategy that will dictate what + /// supplemental groups is used in the SecurityContext. + public V1beta1SupplementalGroupsStrategyOptions(IList ranges = default(IList), string rule = default(string)) + { + Ranges = ranges; + Rule = rule; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets ranges are the allowed ranges of supplemental groups. + /// If you would like to force a single supplemental group then supply + /// a single range with the same start and end. + /// + [JsonProperty(PropertyName = "ranges")] + public IList Ranges { get; set; } + + /// + /// Gets or sets rule is the strategy that will dictate what + /// supplemental groups is used in the SecurityContext. + /// + [JsonProperty(PropertyName = "rule")] + public string Rule { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1ThirdPartyResource.cs b/src/generated/Models/V1beta1ThirdPartyResource.cs new file mode 100755 index 000000000..497f2514e --- /dev/null +++ b/src/generated/Models/V1beta1ThirdPartyResource.cs @@ -0,0 +1,99 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A ThirdPartyResource is a generic representation of a resource, it is + /// used by add-ons and plugins to add new resource types to the API. It + /// consists of one or more Versions of the api. + /// + public partial class V1beta1ThirdPartyResource + { + /// + /// Initializes a new instance of the V1beta1ThirdPartyResource class. + /// + public V1beta1ThirdPartyResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1ThirdPartyResource class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Description is the description of this + /// object. + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object metadata + /// Versions are versions for this third party + /// object + public V1beta1ThirdPartyResource(string apiVersion = default(string), string description = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), IList versions = default(IList)) + { + ApiVersion = apiVersion; + Description = description; + Kind = kind; + Metadata = metadata; + Versions = versions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets description is the description of this object. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets versions are versions for this third party object + /// + [JsonProperty(PropertyName = "versions")] + public IList Versions { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1ThirdPartyResourceList.cs b/src/generated/Models/V1beta1ThirdPartyResourceList.cs new file mode 100755 index 000000000..fbce42436 --- /dev/null +++ b/src/generated/Models/V1beta1ThirdPartyResourceList.cs @@ -0,0 +1,104 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ThirdPartyResourceList is a list of ThirdPartyResources. + /// + public partial class V1beta1ThirdPartyResourceList + { + /// + /// Initializes a new instance of the V1beta1ThirdPartyResourceList + /// class. + /// + public V1beta1ThirdPartyResourceList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1ThirdPartyResourceList + /// class. + /// + /// Items is the list of + /// ThirdPartyResources. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata. + public V1beta1ThirdPartyResourceList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is the list of ThirdPartyResources. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + } + } +} diff --git a/src/generated/Models/V1beta1TokenReview.cs b/src/generated/Models/V1beta1TokenReview.cs new file mode 100755 index 000000000..ceca64c06 --- /dev/null +++ b/src/generated/Models/V1beta1TokenReview.cs @@ -0,0 +1,111 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// TokenReview attempts to authenticate a token to a known user. Note: + /// TokenReview requests may be cached by the webhook token authenticator + /// plugin in the kube-apiserver. + /// + public partial class V1beta1TokenReview + { + /// + /// Initializes a new instance of the V1beta1TokenReview class. + /// + public V1beta1TokenReview() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1TokenReview class. + /// + /// Spec holds information about the request being + /// evaluated + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Status is filled in by the server and + /// indicates whether the request can be authenticated. + public V1beta1TokenReview(V1beta1TokenReviewSpec spec, string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V1beta1TokenReviewStatus status = default(V1beta1TokenReviewStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec holds information about the request being + /// evaluated + /// + [JsonProperty(PropertyName = "spec")] + public V1beta1TokenReviewSpec Spec { get; set; } + + /// + /// Gets or sets status is filled in by the server and indicates + /// whether the request can be authenticated. + /// + [JsonProperty(PropertyName = "status")] + public V1beta1TokenReviewStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Spec"); + } + } + } +} diff --git a/src/generated/Models/V1beta1TokenReviewSpec.cs b/src/generated/Models/V1beta1TokenReviewSpec.cs new file mode 100755 index 000000000..d4424fab2 --- /dev/null +++ b/src/generated/Models/V1beta1TokenReviewSpec.cs @@ -0,0 +1,45 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// TokenReviewSpec is a description of the token authentication request. + /// + public partial class V1beta1TokenReviewSpec + { + /// + /// Initializes a new instance of the V1beta1TokenReviewSpec class. + /// + public V1beta1TokenReviewSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1TokenReviewSpec class. + /// + /// Token is the opaque bearer token. + public V1beta1TokenReviewSpec(string token = default(string)) + { + Token = token; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets token is the opaque bearer token. + /// + [JsonProperty(PropertyName = "token")] + public string Token { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1TokenReviewStatus.cs b/src/generated/Models/V1beta1TokenReviewStatus.cs new file mode 100755 index 000000000..ddb337eab --- /dev/null +++ b/src/generated/Models/V1beta1TokenReviewStatus.cs @@ -0,0 +1,66 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// TokenReviewStatus is the result of the token authentication request. + /// + public partial class V1beta1TokenReviewStatus + { + /// + /// Initializes a new instance of the V1beta1TokenReviewStatus class. + /// + public V1beta1TokenReviewStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1TokenReviewStatus class. + /// + /// Authenticated indicates that the token + /// was associated with a known user. + /// Error indicates that the token couldn't be + /// checked + /// User is the UserInfo associated with the + /// provided token. + public V1beta1TokenReviewStatus(bool? authenticated = default(bool?), string error = default(string), V1beta1UserInfo user = default(V1beta1UserInfo)) + { + Authenticated = authenticated; + Error = error; + User = user; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets authenticated indicates that the token was associated + /// with a known user. + /// + [JsonProperty(PropertyName = "authenticated")] + public bool? Authenticated { get; set; } + + /// + /// Gets or sets error indicates that the token couldn't be checked + /// + [JsonProperty(PropertyName = "error")] + public string Error { get; set; } + + /// + /// Gets or sets user is the UserInfo associated with the provided + /// token. + /// + [JsonProperty(PropertyName = "user")] + public V1beta1UserInfo User { get; set; } + + } +} diff --git a/src/generated/Models/V1beta1UserInfo.cs b/src/generated/Models/V1beta1UserInfo.cs new file mode 100755 index 000000000..ae6f9dc28 --- /dev/null +++ b/src/generated/Models/V1beta1UserInfo.cs @@ -0,0 +1,81 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// UserInfo holds the information about the user needed to implement the + /// user.Info interface. + /// + public partial class V1beta1UserInfo + { + /// + /// Initializes a new instance of the V1beta1UserInfo class. + /// + public V1beta1UserInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V1beta1UserInfo class. + /// + /// Any additional information provided by the + /// authenticator. + /// The names of groups this user is a part + /// of. + /// A unique value that identifies this user across + /// time. If this user is deleted and another user by the same name is + /// added, they will have different UIDs. + /// The name that uniquely identifies this user + /// among all active users. + public V1beta1UserInfo(IDictionary> extra = default(IDictionary>), IList groups = default(IList), string uid = default(string), string username = default(string)) + { + Extra = extra; + Groups = groups; + Uid = uid; + Username = username; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets any additional information provided by the + /// authenticator. + /// + [JsonProperty(PropertyName = "extra")] + public IDictionary> Extra { get; set; } + + /// + /// Gets or sets the names of groups this user is a part of. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; set; } + + /// + /// Gets or sets a unique value that identifies this user across time. + /// If this user is deleted and another user by the same name is added, + /// they will have different UIDs. + /// + [JsonProperty(PropertyName = "uid")] + public string Uid { get; set; } + + /// + /// Gets or sets the name that uniquely identifies this user among all + /// active users. + /// + [JsonProperty(PropertyName = "username")] + public string Username { get; set; } + + } +} diff --git a/src/generated/Models/V2alpha1CronJob.cs b/src/generated/Models/V2alpha1CronJob.cs new file mode 100755 index 000000000..e4e30a30c --- /dev/null +++ b/src/generated/Models/V2alpha1CronJob.cs @@ -0,0 +1,116 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// CronJob represents the configuration of a single cron job. + /// + public partial class V2alpha1CronJob + { + /// + /// Initializes a new instance of the V2alpha1CronJob class. + /// + public V2alpha1CronJob() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1CronJob class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Spec is a structure defining the expected + /// behavior of a job, including the schedule. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// Status is a structure describing current + /// status of a job. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V2alpha1CronJob(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V2alpha1CronJobSpec spec = default(V2alpha1CronJobSpec), V2alpha1CronJobStatus status = default(V2alpha1CronJobStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard object's metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec is a structure defining the expected behavior of + /// a job, including the schedule. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V2alpha1CronJobSpec Spec { get; set; } + + /// + /// Gets or sets status is a structure describing current status of a + /// job. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "status")] + public V2alpha1CronJobStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/V2alpha1CronJobList.cs b/src/generated/Models/V2alpha1CronJobList.cs new file mode 100755 index 000000000..90aaf21e0 --- /dev/null +++ b/src/generated/Models/V2alpha1CronJobList.cs @@ -0,0 +1,113 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// CronJobList is a collection of cron jobs. + /// + public partial class V2alpha1CronJobList + { + /// + /// Initializes a new instance of the V2alpha1CronJobList class. + /// + public V2alpha1CronJobList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1CronJobList class. + /// + /// Items is the list of CronJob. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// Standard list metadata More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + public V2alpha1CronJobList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is the list of CronJob. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets standard list metadata More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V2alpha1CronJobSpec.cs b/src/generated/Models/V2alpha1CronJobSpec.cs new file mode 100755 index 000000000..baa256b88 --- /dev/null +++ b/src/generated/Models/V2alpha1CronJobSpec.cs @@ -0,0 +1,137 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// CronJobSpec describes how the job execution will look like and when it + /// will actually run. + /// + public partial class V2alpha1CronJobSpec + { + /// + /// Initializes a new instance of the V2alpha1CronJobSpec class. + /// + public V2alpha1CronJobSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1CronJobSpec class. + /// + /// JobTemplate is the object that describes + /// the job that will be created when executing a CronJob. + /// Schedule contains the schedule in Cron + /// format, see https://en.wikipedia.org/wiki/Cron. + /// ConcurrencyPolicy specifies how to + /// treat concurrent executions of a Job. + /// The number of failed finished + /// jobs to retain. This is a pointer to distinguish between explicit + /// zero and not specified. + /// Optional deadline in seconds + /// for starting the job if it misses scheduled time for any reason. + /// Missed jobs executions will be counted as failed ones. + /// The number of successful + /// finished jobs to retain. This is a pointer to distinguish between + /// explicit zero and not specified. + /// Suspend flag tells the controller to suspend + /// subsequent executions, it does not apply to already started + /// executions. Defaults to false. + public V2alpha1CronJobSpec(V2alpha1JobTemplateSpec jobTemplate, string schedule, string concurrencyPolicy = default(string), int? failedJobsHistoryLimit = default(int?), long? startingDeadlineSeconds = default(long?), int? successfulJobsHistoryLimit = default(int?), bool? suspend = default(bool?)) + { + ConcurrencyPolicy = concurrencyPolicy; + FailedJobsHistoryLimit = failedJobsHistoryLimit; + JobTemplate = jobTemplate; + Schedule = schedule; + StartingDeadlineSeconds = startingDeadlineSeconds; + SuccessfulJobsHistoryLimit = successfulJobsHistoryLimit; + Suspend = suspend; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets concurrencyPolicy specifies how to treat concurrent + /// executions of a Job. + /// + [JsonProperty(PropertyName = "concurrencyPolicy")] + public string ConcurrencyPolicy { get; set; } + + /// + /// Gets or sets the number of failed finished jobs to retain. This is + /// a pointer to distinguish between explicit zero and not specified. + /// + [JsonProperty(PropertyName = "failedJobsHistoryLimit")] + public int? FailedJobsHistoryLimit { get; set; } + + /// + /// Gets or sets jobTemplate is the object that describes the job that + /// will be created when executing a CronJob. + /// + [JsonProperty(PropertyName = "jobTemplate")] + public V2alpha1JobTemplateSpec JobTemplate { get; set; } + + /// + /// Gets or sets schedule contains the schedule in Cron format, see + /// https://en.wikipedia.org/wiki/Cron. + /// + [JsonProperty(PropertyName = "schedule")] + public string Schedule { get; set; } + + /// + /// Gets or sets optional deadline in seconds for starting the job if + /// it misses scheduled time for any reason. Missed jobs executions + /// will be counted as failed ones. + /// + [JsonProperty(PropertyName = "startingDeadlineSeconds")] + public long? StartingDeadlineSeconds { get; set; } + + /// + /// Gets or sets the number of successful finished jobs to retain. This + /// is a pointer to distinguish between explicit zero and not + /// specified. + /// + [JsonProperty(PropertyName = "successfulJobsHistoryLimit")] + public int? SuccessfulJobsHistoryLimit { get; set; } + + /// + /// Gets or sets suspend flag tells the controller to suspend + /// subsequent executions, it does not apply to already started + /// executions. Defaults to false. + /// + [JsonProperty(PropertyName = "suspend")] + public bool? Suspend { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (JobTemplate == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "JobTemplate"); + } + if (Schedule == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Schedule"); + } + if (JobTemplate != null) + { + JobTemplate.Validate(); + } + } + } +} diff --git a/src/generated/Models/V2alpha1CronJobStatus.cs b/src/generated/Models/V2alpha1CronJobStatus.cs new file mode 100755 index 000000000..12470d134 --- /dev/null +++ b/src/generated/Models/V2alpha1CronJobStatus.cs @@ -0,0 +1,59 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// CronJobStatus represents the current state of a cron job. + /// + public partial class V2alpha1CronJobStatus + { + /// + /// Initializes a new instance of the V2alpha1CronJobStatus class. + /// + public V2alpha1CronJobStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1CronJobStatus class. + /// + /// Active holds pointers to currently running + /// jobs. + /// LastScheduleTime keeps information + /// of when was the last time the job was successfully + /// scheduled. + public V2alpha1CronJobStatus(IList active = default(IList), System.DateTime? lastScheduleTime = default(System.DateTime?)) + { + Active = active; + LastScheduleTime = lastScheduleTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets active holds pointers to currently running jobs. + /// + [JsonProperty(PropertyName = "active")] + public IList Active { get; set; } + + /// + /// Gets or sets lastScheduleTime keeps information of when was the + /// last time the job was successfully scheduled. + /// + [JsonProperty(PropertyName = "lastScheduleTime")] + public System.DateTime? LastScheduleTime { get; set; } + + } +} diff --git a/src/generated/Models/V2alpha1CrossVersionObjectReference.cs b/src/generated/Models/V2alpha1CrossVersionObjectReference.cs new file mode 100755 index 000000000..370b95df8 --- /dev/null +++ b/src/generated/Models/V2alpha1CrossVersionObjectReference.cs @@ -0,0 +1,86 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// CrossVersionObjectReference contains enough information to let you + /// identify the referred resource. + /// + public partial class V2alpha1CrossVersionObjectReference + { + /// + /// Initializes a new instance of the + /// V2alpha1CrossVersionObjectReference class. + /// + public V2alpha1CrossVersionObjectReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V2alpha1CrossVersionObjectReference class. + /// + /// Kind of the referent; More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + /// Name of the referent; More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// API version of the referent + public V2alpha1CrossVersionObjectReference(string kind, string name, string apiVersion = default(string)) + { + ApiVersion = apiVersion; + Kind = kind; + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets API version of the referent + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind of the referent; More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets name of the referent; More info: + /// http://kubernetes.io/docs/user-guide/identifiers#names + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Kind == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Kind"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/src/generated/Models/V2alpha1HorizontalPodAutoscaler.cs b/src/generated/Models/V2alpha1HorizontalPodAutoscaler.cs new file mode 100755 index 000000000..23217e5ac --- /dev/null +++ b/src/generated/Models/V2alpha1HorizontalPodAutoscaler.cs @@ -0,0 +1,124 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// HorizontalPodAutoscaler is the configuration for a horizontal pod + /// autoscaler, which automatically manages the replica count of any + /// resource implementing the scale subresource based on the metrics + /// specified. + /// + public partial class V2alpha1HorizontalPodAutoscaler + { + /// + /// Initializes a new instance of the V2alpha1HorizontalPodAutoscaler + /// class. + /// + public V2alpha1HorizontalPodAutoscaler() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1HorizontalPodAutoscaler + /// class. + /// + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// metadata is the standard object metadata. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// spec is the specification for the behaviour of + /// the autoscaler. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// status is the current information about the + /// autoscaler. + public V2alpha1HorizontalPodAutoscaler(string apiVersion = default(string), string kind = default(string), V1ObjectMeta metadata = default(V1ObjectMeta), V2alpha1HorizontalPodAutoscalerSpec spec = default(V2alpha1HorizontalPodAutoscalerSpec), V2alpha1HorizontalPodAutoscalerStatus status = default(V2alpha1HorizontalPodAutoscalerStatus)) + { + ApiVersion = apiVersion; + Kind = kind; + Metadata = metadata; + Spec = spec; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets metadata is the standard object metadata. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets spec is the specification for the behaviour of the + /// autoscaler. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. + /// + [JsonProperty(PropertyName = "spec")] + public V2alpha1HorizontalPodAutoscalerSpec Spec { get; set; } + + /// + /// Gets or sets status is the current information about the + /// autoscaler. + /// + [JsonProperty(PropertyName = "status")] + public V2alpha1HorizontalPodAutoscalerStatus Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + if (Status != null) + { + Status.Validate(); + } + } + } +} diff --git a/src/generated/Models/V2alpha1HorizontalPodAutoscalerList.cs b/src/generated/Models/V2alpha1HorizontalPodAutoscalerList.cs new file mode 100755 index 000000000..22e4342d0 --- /dev/null +++ b/src/generated/Models/V2alpha1HorizontalPodAutoscalerList.cs @@ -0,0 +1,116 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. + /// + public partial class V2alpha1HorizontalPodAutoscalerList + { + /// + /// Initializes a new instance of the + /// V2alpha1HorizontalPodAutoscalerList class. + /// + public V2alpha1HorizontalPodAutoscalerList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V2alpha1HorizontalPodAutoscalerList class. + /// + /// items is the list of horizontal pod autoscaler + /// objects. + /// APIVersion defines the versioned schema of + /// this representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// Kind is a string value representing the REST + /// resource this object represents. Servers may infer this from the + /// endpoint the client submits requests to. Cannot be updated. In + /// CamelCase. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// metadata is the standard list + /// metadata. + public V2alpha1HorizontalPodAutoscalerList(IList items, string apiVersion = default(string), string kind = default(string), V1ListMeta metadata = default(V1ListMeta)) + { + ApiVersion = apiVersion; + Items = items; + Kind = kind; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets aPIVersion defines the versioned schema of this + /// representation of an object. Servers should convert recognized + /// schemas to the latest internal value, and may reject unrecognized + /// values. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources + /// + [JsonProperty(PropertyName = "apiVersion")] + public string ApiVersion { get; set; } + + /// + /// Gets or sets items is the list of horizontal pod autoscaler + /// objects. + /// + [JsonProperty(PropertyName = "items")] + public IList Items { get; set; } + + /// + /// Gets or sets kind is a string value representing the REST resource + /// this object represents. Servers may infer this from the endpoint + /// the client submits requests to. Cannot be updated. In CamelCase. + /// More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds + /// + [JsonProperty(PropertyName = "kind")] + public string Kind { get; set; } + + /// + /// Gets or sets metadata is the standard list metadata. + /// + [JsonProperty(PropertyName = "metadata")] + public V1ListMeta Metadata { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Items != null) + { + foreach (var element in Items) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V2alpha1HorizontalPodAutoscalerSpec.cs b/src/generated/Models/V2alpha1HorizontalPodAutoscalerSpec.cs new file mode 100755 index 000000000..31b130d31 --- /dev/null +++ b/src/generated/Models/V2alpha1HorizontalPodAutoscalerSpec.cs @@ -0,0 +1,129 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HorizontalPodAutoscalerSpec describes the desired functionality of the + /// HorizontalPodAutoscaler. + /// + public partial class V2alpha1HorizontalPodAutoscalerSpec + { + /// + /// Initializes a new instance of the + /// V2alpha1HorizontalPodAutoscalerSpec class. + /// + public V2alpha1HorizontalPodAutoscalerSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V2alpha1HorizontalPodAutoscalerSpec class. + /// + /// maxReplicas is the upper limit for the + /// number of replicas to which the autoscaler can scale up. It cannot + /// be less that minReplicas. + /// scaleTargetRef points to the target + /// resource to scale, and is used to the pods for which metrics should + /// be collected, as well as to actually change the replica + /// count. + /// metrics contains the specifications for which + /// to use to calculate the desired replica count (the maximum replica + /// count across all metrics will be used). The desired replica count + /// is calculated multiplying the ratio between the target value and + /// the current value by the current number of pods. Ergo, metrics + /// used must decrease as the pod count is increased, and vice-versa. + /// See the individual metric source types for more information about + /// how each type of metric must respond. + /// minReplicas is the lower limit for the + /// number of replicas to which the autoscaler can scale down. It + /// defaults to 1 pod. + public V2alpha1HorizontalPodAutoscalerSpec(int maxReplicas, V2alpha1CrossVersionObjectReference scaleTargetRef, IList metrics = default(IList), int? minReplicas = default(int?)) + { + MaxReplicas = maxReplicas; + Metrics = metrics; + MinReplicas = minReplicas; + ScaleTargetRef = scaleTargetRef; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets maxReplicas is the upper limit for the number of + /// replicas to which the autoscaler can scale up. It cannot be less + /// that minReplicas. + /// + [JsonProperty(PropertyName = "maxReplicas")] + public int MaxReplicas { get; set; } + + /// + /// Gets or sets metrics contains the specifications for which to use + /// to calculate the desired replica count (the maximum replica count + /// across all metrics will be used). The desired replica count is + /// calculated multiplying the ratio between the target value and the + /// current value by the current number of pods. Ergo, metrics used + /// must decrease as the pod count is increased, and vice-versa. See + /// the individual metric source types for more information about how + /// each type of metric must respond. + /// + [JsonProperty(PropertyName = "metrics")] + public IList Metrics { get; set; } + + /// + /// Gets or sets minReplicas is the lower limit for the number of + /// replicas to which the autoscaler can scale down. It defaults to 1 + /// pod. + /// + [JsonProperty(PropertyName = "minReplicas")] + public int? MinReplicas { get; set; } + + /// + /// Gets or sets scaleTargetRef points to the target resource to scale, + /// and is used to the pods for which metrics should be collected, as + /// well as to actually change the replica count. + /// + [JsonProperty(PropertyName = "scaleTargetRef")] + public V2alpha1CrossVersionObjectReference ScaleTargetRef { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ScaleTargetRef == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ScaleTargetRef"); + } + if (Metrics != null) + { + foreach (var element in Metrics) + { + if (element != null) + { + element.Validate(); + } + } + } + if (ScaleTargetRef != null) + { + ScaleTargetRef.Validate(); + } + } + } +} diff --git a/src/generated/Models/V2alpha1HorizontalPodAutoscalerStatus.cs b/src/generated/Models/V2alpha1HorizontalPodAutoscalerStatus.cs new file mode 100755 index 000000000..32f8f7746 --- /dev/null +++ b/src/generated/Models/V2alpha1HorizontalPodAutoscalerStatus.cs @@ -0,0 +1,122 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HorizontalPodAutoscalerStatus describes the current status of a + /// horizontal pod autoscaler. + /// + public partial class V2alpha1HorizontalPodAutoscalerStatus + { + /// + /// Initializes a new instance of the + /// V2alpha1HorizontalPodAutoscalerStatus class. + /// + public V2alpha1HorizontalPodAutoscalerStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// V2alpha1HorizontalPodAutoscalerStatus class. + /// + /// currentMetrics is the last read state + /// of the metrics used by this autoscaler. + /// currentReplicas is current number of + /// replicas of pods managed by this autoscaler, as last seen by the + /// autoscaler. + /// desiredReplicas is the desired number + /// of replicas of pods managed by this autoscaler, as last calculated + /// by the autoscaler. + /// lastScaleTime is the last time the + /// HorizontalPodAutoscaler scaled the number of pods, used by the + /// autoscaler to control how often the number of pods is + /// changed. + /// observedGeneration is the most + /// recent generation observed by this autoscaler. + public V2alpha1HorizontalPodAutoscalerStatus(IList currentMetrics, int currentReplicas, int desiredReplicas, System.DateTime? lastScaleTime = default(System.DateTime?), long? observedGeneration = default(long?)) + { + CurrentMetrics = currentMetrics; + CurrentReplicas = currentReplicas; + DesiredReplicas = desiredReplicas; + LastScaleTime = lastScaleTime; + ObservedGeneration = observedGeneration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets currentMetrics is the last read state of the metrics + /// used by this autoscaler. + /// + [JsonProperty(PropertyName = "currentMetrics")] + public IList CurrentMetrics { get; set; } + + /// + /// Gets or sets currentReplicas is current number of replicas of pods + /// managed by this autoscaler, as last seen by the autoscaler. + /// + [JsonProperty(PropertyName = "currentReplicas")] + public int CurrentReplicas { get; set; } + + /// + /// Gets or sets desiredReplicas is the desired number of replicas of + /// pods managed by this autoscaler, as last calculated by the + /// autoscaler. + /// + [JsonProperty(PropertyName = "desiredReplicas")] + public int DesiredReplicas { get; set; } + + /// + /// Gets or sets lastScaleTime is the last time the + /// HorizontalPodAutoscaler scaled the number of pods, used by the + /// autoscaler to control how often the number of pods is changed. + /// + [JsonProperty(PropertyName = "lastScaleTime")] + public System.DateTime? LastScaleTime { get; set; } + + /// + /// Gets or sets observedGeneration is the most recent generation + /// observed by this autoscaler. + /// + [JsonProperty(PropertyName = "observedGeneration")] + public long? ObservedGeneration { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (CurrentMetrics == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CurrentMetrics"); + } + if (CurrentMetrics != null) + { + foreach (var element in CurrentMetrics) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/generated/Models/V2alpha1JobTemplateSpec.cs b/src/generated/Models/V2alpha1JobTemplateSpec.cs new file mode 100755 index 000000000..92810e886 --- /dev/null +++ b/src/generated/Models/V2alpha1JobTemplateSpec.cs @@ -0,0 +1,75 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// JobTemplateSpec describes the data a Job should have when created from + /// a template + /// + public partial class V2alpha1JobTemplateSpec + { + /// + /// Initializes a new instance of the V2alpha1JobTemplateSpec class. + /// + public V2alpha1JobTemplateSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1JobTemplateSpec class. + /// + /// Standard object's metadata of the jobs + /// created from this template. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// Specification of the desired behavior of the + /// job. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + public V2alpha1JobTemplateSpec(V1ObjectMeta metadata = default(V1ObjectMeta), V1JobSpec spec = default(V1JobSpec)) + { + Metadata = metadata; + Spec = spec; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets standard object's metadata of the jobs created from + /// this template. More info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata + /// + [JsonProperty(PropertyName = "metadata")] + public V1ObjectMeta Metadata { get; set; } + + /// + /// Gets or sets specification of the desired behavior of the job. More + /// info: + /// http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status + /// + [JsonProperty(PropertyName = "spec")] + public V1JobSpec Spec { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Spec != null) + { + Spec.Validate(); + } + } + } +} diff --git a/src/generated/Models/V2alpha1MetricSpec.cs b/src/generated/Models/V2alpha1MetricSpec.cs new file mode 100755 index 000000000..76d8128ee --- /dev/null +++ b/src/generated/Models/V2alpha1MetricSpec.cs @@ -0,0 +1,118 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// MetricSpec specifies how to scale based on a single metric (only `type` + /// and one other matching field should be set at once). + /// + public partial class V2alpha1MetricSpec + { + /// + /// Initializes a new instance of the V2alpha1MetricSpec class. + /// + public V2alpha1MetricSpec() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1MetricSpec class. + /// + /// type is the type of metric source. It should + /// match one of the fields below. + /// object refers to a metric describing a + /// single kubernetes object (for example, hits-per-second on an + /// Ingress object). + /// pods refers to a metric describing each pod in + /// the current scale target (for example, + /// transactions-processed-per-second). The values will be averaged + /// together before being compared to the target value. + /// resource refers to a resource metric (such + /// as those specified in requests and limits) known to Kubernetes + /// describing each pod in the current scale target (e.g. CPU or + /// memory). Such metrics are built in to Kubernetes, and have special + /// scaling options on top of those available to normal per-pod metrics + /// using the "pods" source. + public V2alpha1MetricSpec(string type, V2alpha1ObjectMetricSource objectProperty = default(V2alpha1ObjectMetricSource), V2alpha1PodsMetricSource pods = default(V2alpha1PodsMetricSource), V2alpha1ResourceMetricSource resource = default(V2alpha1ResourceMetricSource)) + { + ObjectProperty = objectProperty; + Pods = pods; + Resource = resource; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets object refers to a metric describing a single + /// kubernetes object (for example, hits-per-second on an Ingress + /// object). + /// + [JsonProperty(PropertyName = "object")] + public V2alpha1ObjectMetricSource ObjectProperty { get; set; } + + /// + /// Gets or sets pods refers to a metric describing each pod in the + /// current scale target (for example, + /// transactions-processed-per-second). The values will be averaged + /// together before being compared to the target value. + /// + [JsonProperty(PropertyName = "pods")] + public V2alpha1PodsMetricSource Pods { get; set; } + + /// + /// Gets or sets resource refers to a resource metric (such as those + /// specified in requests and limits) known to Kubernetes describing + /// each pod in the current scale target (e.g. CPU or memory). Such + /// metrics are built in to Kubernetes, and have special scaling + /// options on top of those available to normal per-pod metrics using + /// the "pods" source. + /// + [JsonProperty(PropertyName = "resource")] + public V2alpha1ResourceMetricSource Resource { get; set; } + + /// + /// Gets or sets type is the type of metric source. It should match + /// one of the fields below. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + if (ObjectProperty != null) + { + ObjectProperty.Validate(); + } + if (Pods != null) + { + Pods.Validate(); + } + if (Resource != null) + { + Resource.Validate(); + } + } + } +} diff --git a/src/generated/Models/V2alpha1MetricStatus.cs b/src/generated/Models/V2alpha1MetricStatus.cs new file mode 100755 index 000000000..ef78feaa4 --- /dev/null +++ b/src/generated/Models/V2alpha1MetricStatus.cs @@ -0,0 +1,117 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// MetricStatus describes the last-read state of a single metric. + /// + public partial class V2alpha1MetricStatus + { + /// + /// Initializes a new instance of the V2alpha1MetricStatus class. + /// + public V2alpha1MetricStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1MetricStatus class. + /// + /// type is the type of metric source. It will + /// match one of the fields below. + /// object refers to a metric describing a + /// single kubernetes object (for example, hits-per-second on an + /// Ingress object). + /// pods refers to a metric describing each pod in + /// the current scale target (for example, + /// transactions-processed-per-second). The values will be averaged + /// together before being compared to the target value. + /// resource refers to a resource metric (such + /// as those specified in requests and limits) known to Kubernetes + /// describing each pod in the current scale target (e.g. CPU or + /// memory). Such metrics are built in to Kubernetes, and have special + /// scaling options on top of those available to normal per-pod metrics + /// using the "pods" source. + public V2alpha1MetricStatus(string type, V2alpha1ObjectMetricStatus objectProperty = default(V2alpha1ObjectMetricStatus), V2alpha1PodsMetricStatus pods = default(V2alpha1PodsMetricStatus), V2alpha1ResourceMetricStatus resource = default(V2alpha1ResourceMetricStatus)) + { + ObjectProperty = objectProperty; + Pods = pods; + Resource = resource; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets object refers to a metric describing a single + /// kubernetes object (for example, hits-per-second on an Ingress + /// object). + /// + [JsonProperty(PropertyName = "object")] + public V2alpha1ObjectMetricStatus ObjectProperty { get; set; } + + /// + /// Gets or sets pods refers to a metric describing each pod in the + /// current scale target (for example, + /// transactions-processed-per-second). The values will be averaged + /// together before being compared to the target value. + /// + [JsonProperty(PropertyName = "pods")] + public V2alpha1PodsMetricStatus Pods { get; set; } + + /// + /// Gets or sets resource refers to a resource metric (such as those + /// specified in requests and limits) known to Kubernetes describing + /// each pod in the current scale target (e.g. CPU or memory). Such + /// metrics are built in to Kubernetes, and have special scaling + /// options on top of those available to normal per-pod metrics using + /// the "pods" source. + /// + [JsonProperty(PropertyName = "resource")] + public V2alpha1ResourceMetricStatus Resource { get; set; } + + /// + /// Gets or sets type is the type of metric source. It will match one + /// of the fields below. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + if (ObjectProperty != null) + { + ObjectProperty.Validate(); + } + if (Pods != null) + { + Pods.Validate(); + } + if (Resource != null) + { + Resource.Validate(); + } + } + } +} diff --git a/src/generated/Models/V2alpha1ObjectMetricSource.cs b/src/generated/Models/V2alpha1ObjectMetricSource.cs new file mode 100755 index 000000000..6bb7c5b81 --- /dev/null +++ b/src/generated/Models/V2alpha1ObjectMetricSource.cs @@ -0,0 +1,92 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ObjectMetricSource indicates how to scale on a metric describing a + /// kubernetes object (for example, hits-per-second on an Ingress object). + /// + public partial class V2alpha1ObjectMetricSource + { + /// + /// Initializes a new instance of the V2alpha1ObjectMetricSource class. + /// + public V2alpha1ObjectMetricSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1ObjectMetricSource class. + /// + /// metricName is the name of the metric in + /// question. + /// target is the described Kubernetes + /// object. + /// targetValue is the target value of the + /// metric (as a quantity). + public V2alpha1ObjectMetricSource(string metricName, V2alpha1CrossVersionObjectReference target, string targetValue) + { + MetricName = metricName; + Target = target; + TargetValue = targetValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets metricName is the name of the metric in question. + /// + [JsonProperty(PropertyName = "metricName")] + public string MetricName { get; set; } + + /// + /// Gets or sets target is the described Kubernetes object. + /// + [JsonProperty(PropertyName = "target")] + public V2alpha1CrossVersionObjectReference Target { get; set; } + + /// + /// Gets or sets targetValue is the target value of the metric (as a + /// quantity). + /// + [JsonProperty(PropertyName = "targetValue")] + public string TargetValue { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (MetricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MetricName"); + } + if (Target == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Target"); + } + if (TargetValue == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetValue"); + } + if (Target != null) + { + Target.Validate(); + } + } + } +} diff --git a/src/generated/Models/V2alpha1ObjectMetricStatus.cs b/src/generated/Models/V2alpha1ObjectMetricStatus.cs new file mode 100755 index 000000000..3a7d10c10 --- /dev/null +++ b/src/generated/Models/V2alpha1ObjectMetricStatus.cs @@ -0,0 +1,92 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ObjectMetricStatus indicates the current value of a metric describing a + /// kubernetes object (for example, hits-per-second on an Ingress object). + /// + public partial class V2alpha1ObjectMetricStatus + { + /// + /// Initializes a new instance of the V2alpha1ObjectMetricStatus class. + /// + public V2alpha1ObjectMetricStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1ObjectMetricStatus class. + /// + /// currentValue is the current value of the + /// metric (as a quantity). + /// metricName is the name of the metric in + /// question. + /// target is the described Kubernetes + /// object. + public V2alpha1ObjectMetricStatus(string currentValue, string metricName, V2alpha1CrossVersionObjectReference target) + { + CurrentValue = currentValue; + MetricName = metricName; + Target = target; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets currentValue is the current value of the metric (as a + /// quantity). + /// + [JsonProperty(PropertyName = "currentValue")] + public string CurrentValue { get; set; } + + /// + /// Gets or sets metricName is the name of the metric in question. + /// + [JsonProperty(PropertyName = "metricName")] + public string MetricName { get; set; } + + /// + /// Gets or sets target is the described Kubernetes object. + /// + [JsonProperty(PropertyName = "target")] + public V2alpha1CrossVersionObjectReference Target { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (CurrentValue == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CurrentValue"); + } + if (MetricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MetricName"); + } + if (Target == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Target"); + } + if (Target != null) + { + Target.Validate(); + } + } + } +} diff --git a/src/generated/Models/V2alpha1PodsMetricSource.cs b/src/generated/Models/V2alpha1PodsMetricSource.cs new file mode 100755 index 000000000..31ec586b8 --- /dev/null +++ b/src/generated/Models/V2alpha1PodsMetricSource.cs @@ -0,0 +1,78 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// PodsMetricSource indicates how to scale on a metric describing each pod + /// in the current scale target (for example, + /// transactions-processed-per-second). The values will be averaged + /// together before being compared to the target value. + /// + public partial class V2alpha1PodsMetricSource + { + /// + /// Initializes a new instance of the V2alpha1PodsMetricSource class. + /// + public V2alpha1PodsMetricSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1PodsMetricSource class. + /// + /// metricName is the name of the metric in + /// question + /// targetAverageValue is the target + /// value of the average of the metric across all relevant pods (as a + /// quantity) + public V2alpha1PodsMetricSource(string metricName, string targetAverageValue) + { + MetricName = metricName; + TargetAverageValue = targetAverageValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets metricName is the name of the metric in question + /// + [JsonProperty(PropertyName = "metricName")] + public string MetricName { get; set; } + + /// + /// Gets or sets targetAverageValue is the target value of the average + /// of the metric across all relevant pods (as a quantity) + /// + [JsonProperty(PropertyName = "targetAverageValue")] + public string TargetAverageValue { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (MetricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MetricName"); + } + if (TargetAverageValue == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetAverageValue"); + } + } + } +} diff --git a/src/generated/Models/V2alpha1PodsMetricStatus.cs b/src/generated/Models/V2alpha1PodsMetricStatus.cs new file mode 100755 index 000000000..69723bfcd --- /dev/null +++ b/src/generated/Models/V2alpha1PodsMetricStatus.cs @@ -0,0 +1,77 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// PodsMetricStatus indicates the current value of a metric describing + /// each pod in the current scale target (for example, + /// transactions-processed-per-second). + /// + public partial class V2alpha1PodsMetricStatus + { + /// + /// Initializes a new instance of the V2alpha1PodsMetricStatus class. + /// + public V2alpha1PodsMetricStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1PodsMetricStatus class. + /// + /// currentAverageValue is the + /// current value of the average of the metric across all relevant pods + /// (as a quantity) + /// metricName is the name of the metric in + /// question + public V2alpha1PodsMetricStatus(string currentAverageValue, string metricName) + { + CurrentAverageValue = currentAverageValue; + MetricName = metricName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets currentAverageValue is the current value of the + /// average of the metric across all relevant pods (as a quantity) + /// + [JsonProperty(PropertyName = "currentAverageValue")] + public string CurrentAverageValue { get; set; } + + /// + /// Gets or sets metricName is the name of the metric in question + /// + [JsonProperty(PropertyName = "metricName")] + public string MetricName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (CurrentAverageValue == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CurrentAverageValue"); + } + if (MetricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MetricName"); + } + } + } +} diff --git a/src/generated/Models/V2alpha1ResourceMetricSource.cs b/src/generated/Models/V2alpha1ResourceMetricSource.cs new file mode 100755 index 000000000..bfb57a563 --- /dev/null +++ b/src/generated/Models/V2alpha1ResourceMetricSource.cs @@ -0,0 +1,96 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ResourceMetricSource indicates how to scale on a resource metric known + /// to Kubernetes, as specified in requests and limits, describing each pod + /// in the current scale target (e.g. CPU or memory). The values will be + /// averaged together before being compared to the target. Such metrics + /// are built in to Kubernetes, and have special scaling options on top of + /// those available to normal per-pod metrics using the "pods" source. + /// Only one "target" type should be set. + /// + public partial class V2alpha1ResourceMetricSource + { + /// + /// Initializes a new instance of the V2alpha1ResourceMetricSource + /// class. + /// + public V2alpha1ResourceMetricSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1ResourceMetricSource + /// class. + /// + /// name is the name of the resource in + /// question. + /// targetAverageUtilization is + /// the target value of the average of the resource metric across all + /// relevant pods, represented as a percentage of the requested value + /// of the resource for the pods. + /// targetAverageValue is the the + /// target value of the average of the resource metric across all + /// relevant pods, as a raw value (instead of as a percentage of the + /// request), similar to the "pods" metric source type. + public V2alpha1ResourceMetricSource(string name, int? targetAverageUtilization = default(int?), string targetAverageValue = default(string)) + { + Name = name; + TargetAverageUtilization = targetAverageUtilization; + TargetAverageValue = targetAverageValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name is the name of the resource in question. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets targetAverageUtilization is the target value of the + /// average of the resource metric across all relevant pods, + /// represented as a percentage of the requested value of the resource + /// for the pods. + /// + [JsonProperty(PropertyName = "targetAverageUtilization")] + public int? TargetAverageUtilization { get; set; } + + /// + /// Gets or sets targetAverageValue is the the target value of the + /// average of the resource metric across all relevant pods, as a raw + /// value (instead of as a percentage of the request), similar to the + /// "pods" metric source type. + /// + [JsonProperty(PropertyName = "targetAverageValue")] + public string TargetAverageValue { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/src/generated/Models/V2alpha1ResourceMetricStatus.cs b/src/generated/Models/V2alpha1ResourceMetricStatus.cs new file mode 100755 index 000000000..a98a89d31 --- /dev/null +++ b/src/generated/Models/V2alpha1ResourceMetricStatus.cs @@ -0,0 +1,105 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// ResourceMetricStatus indicates the current value of a resource metric + /// known to Kubernetes, as specified in requests and limits, describing + /// each pod in the current scale target (e.g. CPU or memory). Such + /// metrics are built in to Kubernetes, and have special scaling options on + /// top of those available to normal per-pod metrics using the "pods" + /// source. + /// + public partial class V2alpha1ResourceMetricStatus + { + /// + /// Initializes a new instance of the V2alpha1ResourceMetricStatus + /// class. + /// + public V2alpha1ResourceMetricStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the V2alpha1ResourceMetricStatus + /// class. + /// + /// currentAverageValue is the the + /// current value of the average of the resource metric across all + /// relevant pods, as a raw value (instead of as a percentage of the + /// request), similar to the "pods" metric source type. It will always + /// be set, regardless of the corresponding metric + /// specification. + /// name is the name of the resource in + /// question. + /// currentAverageUtilization + /// is the current value of the average of the resource metric across + /// all relevant pods, represented as a percentage of the requested + /// value of the resource for the pods. It will only be present if + /// `targetAverageValue` was set in the corresponding metric + /// specification. + public V2alpha1ResourceMetricStatus(string currentAverageValue, string name, int? currentAverageUtilization = default(int?)) + { + CurrentAverageUtilization = currentAverageUtilization; + CurrentAverageValue = currentAverageValue; + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets currentAverageUtilization is the current value of the + /// average of the resource metric across all relevant pods, + /// represented as a percentage of the requested value of the resource + /// for the pods. It will only be present if `targetAverageValue` was + /// set in the corresponding metric specification. + /// + [JsonProperty(PropertyName = "currentAverageUtilization")] + public int? CurrentAverageUtilization { get; set; } + + /// + /// Gets or sets currentAverageValue is the the current value of the + /// average of the resource metric across all relevant pods, as a raw + /// value (instead of as a percentage of the request), similar to the + /// "pods" metric source type. It will always be set, regardless of the + /// corresponding metric specification. + /// + [JsonProperty(PropertyName = "currentAverageValue")] + public string CurrentAverageValue { get; set; } + + /// + /// Gets or sets name is the name of the resource in question. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (CurrentAverageValue == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CurrentAverageValue"); + } + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/src/generated/Models/VersionInfo.cs b/src/generated/Models/VersionInfo.cs new file mode 100755 index 000000000..2014eaa03 --- /dev/null +++ b/src/generated/Models/VersionInfo.cs @@ -0,0 +1,138 @@ +// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace k8s.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Info contains versioning information. how we'll want to distribute that + /// information. + /// + public partial class VersionInfo + { + /// + /// Initializes a new instance of the VersionInfo class. + /// + public VersionInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VersionInfo class. + /// + public VersionInfo(string buildDate, string compiler, string gitCommit, string gitTreeState, string gitVersion, string goVersion, string major, string minor, string platform) + { + BuildDate = buildDate; + Compiler = compiler; + GitCommit = gitCommit; + GitTreeState = gitTreeState; + GitVersion = gitVersion; + GoVersion = goVersion; + Major = major; + Minor = minor; + Platform = platform; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "buildDate")] + public string BuildDate { get; set; } + + /// + /// + [JsonProperty(PropertyName = "compiler")] + public string Compiler { get; set; } + + /// + /// + [JsonProperty(PropertyName = "gitCommit")] + public string GitCommit { get; set; } + + /// + /// + [JsonProperty(PropertyName = "gitTreeState")] + public string GitTreeState { get; set; } + + /// + /// + [JsonProperty(PropertyName = "gitVersion")] + public string GitVersion { get; set; } + + /// + /// + [JsonProperty(PropertyName = "goVersion")] + public string GoVersion { get; set; } + + /// + /// + [JsonProperty(PropertyName = "major")] + public string Major { get; set; } + + /// + /// + [JsonProperty(PropertyName = "minor")] + public string Minor { get; set; } + + /// + /// + [JsonProperty(PropertyName = "platform")] + public string Platform { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (BuildDate == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "BuildDate"); + } + if (Compiler == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Compiler"); + } + if (GitCommit == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "GitCommit"); + } + if (GitTreeState == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "GitTreeState"); + } + if (GitVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "GitVersion"); + } + if (GoVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "GoVersion"); + } + if (Major == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Major"); + } + if (Minor == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Minor"); + } + if (Platform == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Platform"); + } + } + } +} diff --git a/src/generated/swagger.json b/src/generated/swagger.json new file mode 100644 index 000000000..309bb35a4 --- /dev/null +++ b/src/generated/swagger.json @@ -0,0 +1,42455 @@ +{ + "swagger": "2.0", + "info": { + "title": "Kubernetes", + "version": "v1.6.0" + }, + "paths": { + "/api/": { + "get": { + "description": "get available API versions", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core" + ], + "operationId": "getAPIVersions", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIVersions" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/api/v1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/api/v1/componentstatuses": { + "get": { + "description": "list objects of kind ComponentStatus", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listComponentStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ComponentStatusList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/componentstatuses/{name}": { + "get": { + "description": "read the specified ComponentStatus", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readComponentStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ComponentStatus" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ComponentStatus", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/configmaps": { + "get": { + "description": "list or watch objects of kind ConfigMap", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listConfigMapForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ConfigMapList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/endpoints": { + "get": { + "description": "list or watch objects of kind Endpoints", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listEndpointsForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.EndpointsList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/events": { + "get": { + "description": "list or watch objects of kind Event", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listEventForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.EventList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/limitranges": { + "get": { + "description": "list or watch objects of kind LimitRange", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listLimitRangeForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.LimitRangeList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/namespaces": { + "get": { + "description": "list or watch objects of kind Namespace", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespace", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.NamespaceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a Namespace", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespace", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Namespace", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNamespace", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/bindings": { + "post": { + "description": "create a Binding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Binding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Binding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/configmaps": { + "get": { + "description": "list or watch objects of kind ConfigMap", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespacedConfigMap", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ConfigMapList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ConfigMap", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedConfigMap", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ConfigMap" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ConfigMap" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ConfigMap", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNamespacedConfigMap", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/configmaps/{name}": { + "get": { + "description": "read the specified ConfigMap", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedConfigMap", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ConfigMap" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ConfigMap", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedConfigMap", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ConfigMap" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ConfigMap" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ConfigMap", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespacedConfigMap", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ConfigMap", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedConfigMap", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ConfigMap" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ConfigMap", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/endpoints": { + "get": { + "description": "list or watch objects of kind Endpoints", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespacedEndpoints", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.EndpointsList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create Endpoints", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedEndpoints", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Endpoints" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Endpoints" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Endpoints", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNamespacedEndpoints", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/endpoints/{name}": { + "get": { + "description": "read the specified Endpoints", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedEndpoints", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Endpoints" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Endpoints", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedEndpoints", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Endpoints" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Endpoints" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete Endpoints", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespacedEndpoints", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Endpoints", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedEndpoints", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Endpoints" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Endpoints", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/events": { + "get": { + "description": "list or watch objects of kind Event", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespacedEvent", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.EventList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create an Event", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedEvent", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Event" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Event" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Event", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNamespacedEvent", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/events/{name}": { + "get": { + "description": "read the specified Event", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedEvent", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Event" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Event", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedEvent", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Event" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Event" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete an Event", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespacedEvent", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Event", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedEvent", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Event" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Event", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/limitranges": { + "get": { + "description": "list or watch objects of kind LimitRange", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespacedLimitRange", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.LimitRangeList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a LimitRange", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedLimitRange", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.LimitRange" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.LimitRange" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of LimitRange", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNamespacedLimitRange", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/limitranges/{name}": { + "get": { + "description": "read the specified LimitRange", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedLimitRange", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.LimitRange" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified LimitRange", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedLimitRange", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.LimitRange" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.LimitRange" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a LimitRange", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespacedLimitRange", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified LimitRange", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedLimitRange", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.LimitRange" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the LimitRange", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/persistentvolumeclaims": { + "get": { + "description": "list or watch objects of kind PersistentVolumeClaim", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespacedPersistentVolumeClaim", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeClaimList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a PersistentVolumeClaim", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedPersistentVolumeClaim", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of PersistentVolumeClaim", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNamespacedPersistentVolumeClaim", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}": { + "get": { + "description": "read the specified PersistentVolumeClaim", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedPersistentVolumeClaim", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified PersistentVolumeClaim", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedPersistentVolumeClaim", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a PersistentVolumeClaim", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespacedPersistentVolumeClaim", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified PersistentVolumeClaim", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedPersistentVolumeClaim", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the PersistentVolumeClaim", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status": { + "get": { + "description": "read status of the specified PersistentVolumeClaim", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedPersistentVolumeClaimStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified PersistentVolumeClaim", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedPersistentVolumeClaimStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified PersistentVolumeClaim", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedPersistentVolumeClaimStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the PersistentVolumeClaim", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/pods": { + "get": { + "description": "list or watch objects of kind Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespacedPod", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PodList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedPod", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Pod" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNamespacedPod", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/pods/{name}": { + "get": { + "description": "read the specified Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedPod", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedPod", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Pod" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespacedPod", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Pod", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedPod", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Pod", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/pods/{name}/attach": { + "get": { + "description": "connect GET requests to attach of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectGetNamespacedPodAttach", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "connect POST requests to attach of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPostNamespacedPodAttach", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "The container in which to execute the command. Defaults to only container if there is only one container in the pod.", + "name": "container", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Pod", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.", + "name": "stderr", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.", + "name": "stdin", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.", + "name": "stdout", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.", + "name": "tty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/pods/{name}/binding": { + "post": { + "description": "create binding of a Binding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedBindingBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Binding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Binding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Binding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/pods/{name}/eviction": { + "post": { + "description": "create eviction of an Eviction", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedEvictionEviction", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.Eviction" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Eviction" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Eviction", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/pods/{name}/exec": { + "get": { + "description": "connect GET requests to exec of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectGetNamespacedPodExec", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "connect POST requests to exec of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPostNamespacedPodExec", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "Command is the remote command to execute. argv array. Not executed within a shell.", + "name": "command", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Container in which to execute the command. Defaults to only container if there is only one container in the pod.", + "name": "container", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Pod", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Redirect the standard error stream of the pod for this call. Defaults to true.", + "name": "stderr", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Redirect the standard input stream of the pod for this call. Defaults to false.", + "name": "stdin", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Redirect the standard output stream of the pod for this call. Defaults to true.", + "name": "stdout", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.", + "name": "tty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/pods/{name}/log": { + "get": { + "description": "read log of the specified Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "text/plain", + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedPodLog", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "The container for which to stream logs. Defaults to only container if there is one container in the pod.", + "name": "container", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Follow the log stream of the pod. Defaults to false.", + "name": "follow", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", + "name": "limitBytes", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Pod", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Return previous terminated container logs. Defaults to false.", + "name": "previous", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", + "name": "sinceSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", + "name": "tailLines", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", + "name": "timestamps", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/pods/{name}/portforward": { + "get": { + "description": "connect GET requests to portforward of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectGetNamespacedPodPortforward", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "connect POST requests to portforward of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPostNamespacedPodPortforward", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Pod", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "integer", + "description": "List of ports to forward Required when using WebSockets", + "name": "ports", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/pods/{name}/proxy": { + "get": { + "description": "connect GET requests to proxy of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectGetNamespacedPodProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "connect PUT requests to proxy of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPutNamespacedPodProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "connect POST requests to proxy of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPostNamespacedPodProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "connect DELETE requests to proxy of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectDeleteNamespacedPodProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "options": { + "description": "connect OPTIONS requests to proxy of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectOptionsNamespacedPodProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "head": { + "description": "connect HEAD requests to proxy of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectHeadNamespacedPodProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Pod", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "Path is the URL path to use for the current proxy request to pod.", + "name": "path", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}": { + "get": { + "description": "connect GET requests to proxy of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectGetNamespacedPodProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "connect PUT requests to proxy of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPutNamespacedPodProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "connect POST requests to proxy of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPostNamespacedPodProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "connect DELETE requests to proxy of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectDeleteNamespacedPodProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "options": { + "description": "connect OPTIONS requests to proxy of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectOptionsNamespacedPodProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "head": { + "description": "connect HEAD requests to proxy of Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectHeadNamespacedPodProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Pod", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "path to the resource", + "name": "path", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "Path is the URL path to use for the current proxy request to pod.", + "name": "path", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/pods/{name}/status": { + "get": { + "description": "read status of the specified Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedPodStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedPodStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Pod" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified Pod", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedPodStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Pod" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Pod", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/podtemplates": { + "get": { + "description": "list or watch objects of kind PodTemplate", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespacedPodTemplate", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PodTemplateList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a PodTemplate", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedPodTemplate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.PodTemplate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PodTemplate" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of PodTemplate", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNamespacedPodTemplate", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/podtemplates/{name}": { + "get": { + "description": "read the specified PodTemplate", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedPodTemplate", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PodTemplate" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified PodTemplate", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedPodTemplate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.PodTemplate" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PodTemplate" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a PodTemplate", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespacedPodTemplate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified PodTemplate", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedPodTemplate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PodTemplate" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the PodTemplate", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/replicationcontrollers": { + "get": { + "description": "list or watch objects of kind ReplicationController", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespacedReplicationController", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ReplicationControllerList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ReplicationController", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedReplicationController", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ReplicationController" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ReplicationController" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ReplicationController", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNamespacedReplicationController", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}": { + "get": { + "description": "read the specified ReplicationController", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedReplicationController", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ReplicationController" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ReplicationController", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedReplicationController", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ReplicationController" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ReplicationController" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ReplicationController", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespacedReplicationController", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ReplicationController", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedReplicationController", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ReplicationController" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ReplicationController", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale": { + "get": { + "description": "read scale of the specified Scale", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedScaleScale", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace scale of the specified Scale", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedScaleScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Scale" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update scale of the specified Scale", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedScaleScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Scale", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status": { + "get": { + "description": "read status of the specified ReplicationController", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedReplicationControllerStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ReplicationController" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified ReplicationController", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedReplicationControllerStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ReplicationController" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ReplicationController" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified ReplicationController", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedReplicationControllerStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ReplicationController" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ReplicationController", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/resourcequotas": { + "get": { + "description": "list or watch objects of kind ResourceQuota", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespacedResourceQuota", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ResourceQuotaList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ResourceQuota", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedResourceQuota", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ResourceQuota" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ResourceQuota" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ResourceQuota", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNamespacedResourceQuota", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/resourcequotas/{name}": { + "get": { + "description": "read the specified ResourceQuota", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedResourceQuota", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ResourceQuota" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ResourceQuota", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedResourceQuota", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ResourceQuota" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ResourceQuota" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ResourceQuota", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespacedResourceQuota", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ResourceQuota", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedResourceQuota", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ResourceQuota" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ResourceQuota", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status": { + "get": { + "description": "read status of the specified ResourceQuota", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedResourceQuotaStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ResourceQuota" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified ResourceQuota", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedResourceQuotaStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ResourceQuota" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ResourceQuota" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified ResourceQuota", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedResourceQuotaStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ResourceQuota" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ResourceQuota", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/secrets": { + "get": { + "description": "list or watch objects of kind Secret", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespacedSecret", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.SecretList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a Secret", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedSecret", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Secret" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Secret" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Secret", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNamespacedSecret", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/secrets/{name}": { + "get": { + "description": "read the specified Secret", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedSecret", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Secret" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Secret", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedSecret", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Secret" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Secret" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a Secret", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespacedSecret", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Secret", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedSecret", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Secret" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Secret", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/serviceaccounts": { + "get": { + "description": "list or watch objects of kind ServiceAccount", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespacedServiceAccount", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ServiceAccountList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ServiceAccount", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedServiceAccount", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ServiceAccount" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ServiceAccount" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ServiceAccount", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNamespacedServiceAccount", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/serviceaccounts/{name}": { + "get": { + "description": "read the specified ServiceAccount", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedServiceAccount", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ServiceAccount" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ServiceAccount", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedServiceAccount", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.ServiceAccount" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ServiceAccount" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ServiceAccount", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespacedServiceAccount", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ServiceAccount", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedServiceAccount", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ServiceAccount" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ServiceAccount", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/services": { + "get": { + "description": "list or watch objects of kind Service", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNamespacedService", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ServiceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a Service", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNamespacedService", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Service" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Service" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/services/{name}": { + "get": { + "description": "read the specified Service", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedService", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Service" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Service", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedService", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Service" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Service" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a Service", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespacedService", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Service", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedService", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Service" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Service", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/services/{name}/proxy": { + "get": { + "description": "connect GET requests to proxy of Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectGetNamespacedServiceProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "connect PUT requests to proxy of Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPutNamespacedServiceProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "connect POST requests to proxy of Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPostNamespacedServiceProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "connect DELETE requests to proxy of Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectDeleteNamespacedServiceProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "options": { + "description": "connect OPTIONS requests to proxy of Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectOptionsNamespacedServiceProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "head": { + "description": "connect HEAD requests to proxy of Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectHeadNamespacedServiceProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Service", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.", + "name": "path", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}": { + "get": { + "description": "connect GET requests to proxy of Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectGetNamespacedServiceProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "connect PUT requests to proxy of Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPutNamespacedServiceProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "connect POST requests to proxy of Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPostNamespacedServiceProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "connect DELETE requests to proxy of Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectDeleteNamespacedServiceProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "options": { + "description": "connect OPTIONS requests to proxy of Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectOptionsNamespacedServiceProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "head": { + "description": "connect HEAD requests to proxy of Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectHeadNamespacedServiceProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Service", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "path to the resource", + "name": "path", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.", + "name": "path", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{namespace}/services/{name}/status": { + "get": { + "description": "read status of the specified Service", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespacedServiceStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Service" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified Service", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespacedServiceStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Service" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Service" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified Service", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespacedServiceStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Service" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Service", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{name}": { + "get": { + "description": "read the specified Namespace", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespace", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Namespace", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespace", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a Namespace", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNamespace", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Namespace", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespace", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Namespace", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{name}/finalize": { + "put": { + "description": "replace finalize of the specified Namespace", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespaceFinalize", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Namespace", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/namespaces/{name}/status": { + "get": { + "description": "read status of the specified Namespace", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNamespaceStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified Namespace", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNamespaceStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified Namespace", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNamespaceStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Namespace", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/nodes": { + "get": { + "description": "list or watch objects of kind Node", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listNode", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.NodeList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a Node", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createNode", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Node" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Node" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionNode", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/nodes/{name}": { + "get": { + "description": "read the specified Node", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNode", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Node" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Node", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNode", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Node" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Node" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a Node", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteNode", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Node", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNode", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Node" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Node", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/nodes/{name}/proxy": { + "get": { + "description": "connect GET requests to proxy of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectGetNodeProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "connect PUT requests to proxy of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPutNodeProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "connect POST requests to proxy of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPostNodeProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "connect DELETE requests to proxy of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectDeleteNodeProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "options": { + "description": "connect OPTIONS requests to proxy of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectOptionsNodeProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "head": { + "description": "connect HEAD requests to proxy of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectHeadNodeProxy", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Node", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "Path is the URL path to use for the current proxy request to node.", + "name": "path", + "in": "query" + } + ] + }, + "/api/v1/nodes/{name}/proxy/{path}": { + "get": { + "description": "connect GET requests to proxy of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectGetNodeProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "connect PUT requests to proxy of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPutNodeProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "connect POST requests to proxy of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectPostNodeProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "connect DELETE requests to proxy of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectDeleteNodeProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "options": { + "description": "connect OPTIONS requests to proxy of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectOptionsNodeProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "head": { + "description": "connect HEAD requests to proxy of Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "connectHeadNodeProxyWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Node", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "path to the resource", + "name": "path", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "Path is the URL path to use for the current proxy request to node.", + "name": "path", + "in": "query" + } + ] + }, + "/api/v1/nodes/{name}/status": { + "get": { + "description": "read status of the specified Node", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readNodeStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Node" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified Node", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replaceNodeStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Node" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Node" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified Node", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchNodeStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Node" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Node", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/persistentvolumeclaims": { + "get": { + "description": "list or watch objects of kind PersistentVolumeClaim", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listPersistentVolumeClaimForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeClaimList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/persistentvolumes": { + "get": { + "description": "list or watch objects of kind PersistentVolume", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listPersistentVolume", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolumeList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a PersistentVolume", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "createPersistentVolume", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.PersistentVolume" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolume" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of PersistentVolume", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deleteCollectionPersistentVolume", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/persistentvolumes/{name}": { + "get": { + "description": "read the specified PersistentVolume", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readPersistentVolume", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolume" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified PersistentVolume", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replacePersistentVolume", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.PersistentVolume" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolume" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a PersistentVolume", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "deletePersistentVolume", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified PersistentVolume", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchPersistentVolume", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolume" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the PersistentVolume", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/persistentvolumes/{name}/status": { + "get": { + "description": "read status of the specified PersistentVolume", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "readPersistentVolumeStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolume" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified PersistentVolume", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "replacePersistentVolumeStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.PersistentVolume" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolume" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified PersistentVolume", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "patchPersistentVolumeStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PersistentVolume" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the PersistentVolume", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/api/v1/pods": { + "get": { + "description": "list or watch objects of kind Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listPodForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PodList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/podtemplates": { + "get": { + "description": "list or watch objects of kind PodTemplate", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listPodTemplateForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.PodTemplateList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/proxy/namespaces/{namespace}/pods/{name}": { + "get": { + "description": "proxy GET requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyGETNamespacedPod", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "proxy PUT requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPUTNamespacedPod", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "proxy POST requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPOSTNamespacedPod", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "proxy DELETE requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyDELETENamespacedPod", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "options": { + "description": "proxy OPTIONS requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyOPTIONSNamespacedPod", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "head": { + "description": "proxy HEAD requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyHEADNamespacedPod", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "proxy PATCH requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPATCHNamespacedPod", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Pod", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + } + ] + }, + "/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}": { + "get": { + "description": "proxy GET requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyGETNamespacedPodWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "proxy PUT requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPUTNamespacedPodWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "proxy POST requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPOSTNamespacedPodWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "proxy DELETE requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyDELETENamespacedPodWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "options": { + "description": "proxy OPTIONS requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyOPTIONSNamespacedPodWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "head": { + "description": "proxy HEAD requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyHEADNamespacedPodWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "proxy PATCH requests to Pod", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPATCHNamespacedPodWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Pod", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "path to the resource", + "name": "path", + "in": "path", + "required": true + } + ] + }, + "/api/v1/proxy/namespaces/{namespace}/services/{name}": { + "get": { + "description": "proxy GET requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyGETNamespacedService", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "proxy PUT requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPUTNamespacedService", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "proxy POST requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPOSTNamespacedService", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "proxy DELETE requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyDELETENamespacedService", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "options": { + "description": "proxy OPTIONS requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyOPTIONSNamespacedService", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "head": { + "description": "proxy HEAD requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyHEADNamespacedService", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "proxy PATCH requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPATCHNamespacedService", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Service", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + } + ] + }, + "/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}": { + "get": { + "description": "proxy GET requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyGETNamespacedServiceWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "proxy PUT requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPUTNamespacedServiceWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "proxy POST requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPOSTNamespacedServiceWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "proxy DELETE requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyDELETENamespacedServiceWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "options": { + "description": "proxy OPTIONS requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyOPTIONSNamespacedServiceWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "head": { + "description": "proxy HEAD requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyHEADNamespacedServiceWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "proxy PATCH requests to Service", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPATCHNamespacedServiceWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Service", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "path to the resource", + "name": "path", + "in": "path", + "required": true + } + ] + }, + "/api/v1/proxy/nodes/{name}": { + "get": { + "description": "proxy GET requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyGETNode", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "proxy PUT requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPUTNode", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "proxy POST requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPOSTNode", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "proxy DELETE requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyDELETENode", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "options": { + "description": "proxy OPTIONS requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyOPTIONSNode", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "head": { + "description": "proxy HEAD requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyHEADNode", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "proxy PATCH requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPATCHNode", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Node", + "name": "name", + "in": "path", + "required": true + } + ] + }, + "/api/v1/proxy/nodes/{name}/{path}": { + "get": { + "description": "proxy GET requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyGETNodeWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "proxy PUT requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPUTNodeWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "proxy POST requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPOSTNodeWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "proxy DELETE requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyDELETENodeWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "options": { + "description": "proxy OPTIONS requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyOPTIONSNodeWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "head": { + "description": "proxy HEAD requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyHEADNodeWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "proxy PATCH requests to Node", + "consumes": [ + "*/*" + ], + "produces": [ + "*/*" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "proxyPATCHNodeWithPath", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Node", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "path to the resource", + "name": "path", + "in": "path", + "required": true + } + ] + }, + "/api/v1/replicationcontrollers": { + "get": { + "description": "list or watch objects of kind ReplicationController", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listReplicationControllerForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ReplicationControllerList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/resourcequotas": { + "get": { + "description": "list or watch objects of kind ResourceQuota", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listResourceQuotaForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ResourceQuotaList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/secrets": { + "get": { + "description": "list or watch objects of kind Secret", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listSecretForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.SecretList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/serviceaccounts": { + "get": { + "description": "list or watch objects of kind ServiceAccount", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listServiceAccountForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ServiceAccountList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/services": { + "get": { + "description": "list or watch objects of kind Service", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "core_v1" + ], + "operationId": "listServiceForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.ServiceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/configmaps": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/endpoints": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/events": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/limitranges": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/configmaps": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/configmaps/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ConfigMap", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/endpoints": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/endpoints/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Endpoints", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/events": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/events/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Event", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/limitranges": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/limitranges/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the LimitRange", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/persistentvolumeclaims": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/persistentvolumeclaims/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the PersistentVolumeClaim", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/pods": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/pods/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Pod", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/podtemplates": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/podtemplates/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the PodTemplate", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/replicationcontrollers": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/replicationcontrollers/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ReplicationController", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/resourcequotas": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/resourcequotas/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ResourceQuota", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/secrets": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/secrets/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Secret", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/serviceaccounts": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/serviceaccounts/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ServiceAccount", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/services": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{namespace}/services/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Service", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/namespaces/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Namespace", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/nodes": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/nodes/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Node", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/persistentvolumeclaims": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/persistentvolumes": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/persistentvolumes/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the PersistentVolume", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/pods": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/podtemplates": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/replicationcontrollers": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/resourcequotas": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/secrets": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/serviceaccounts": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/api/v1/watch/services": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/": { + "get": { + "description": "get available API versions", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apis" + ], + "operationId": "getAPIVersions", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroupList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/apps/": { + "get": { + "description": "get information of a group", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps" + ], + "operationId": "getAPIGroup", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/apps/v1beta1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/apps/v1beta1/deployments": { + "get": { + "description": "list or watch objects of kind Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "listDeploymentForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.DeploymentList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/namespaces/{namespace}/deployments": { + "get": { + "description": "list or watch objects of kind Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "listNamespacedDeployment", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.DeploymentList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "createNamespacedDeployment", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/apps.v1beta1.Deployment" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "deleteCollectionNamespacedDeployment", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}": { + "get": { + "description": "read the specified Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "readNamespacedDeployment", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "replaceNamespacedDeployment", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/apps.v1beta1.Deployment" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "deleteNamespacedDeployment", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Deployment", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "patchNamespacedDeployment", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Deployment", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/rollback": { + "post": { + "description": "create rollback of a DeploymentRollback", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "createNamespacedDeploymentRollbackRollback", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/apps.v1beta1.DeploymentRollback" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.DeploymentRollback" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the DeploymentRollback", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale": { + "get": { + "description": "read scale of the specified Scale", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "readNamespacedScaleScale", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace scale of the specified Scale", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "replaceNamespacedScaleScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/apps.v1beta1.Scale" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update scale of the specified Scale", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "patchNamespacedScaleScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Scale", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status": { + "get": { + "description": "read status of the specified Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "readNamespacedDeploymentStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "replaceNamespacedDeploymentStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/apps.v1beta1.Deployment" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified Deployment", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "patchNamespacedDeploymentStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/apps.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Deployment", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/namespaces/{namespace}/statefulsets": { + "get": { + "description": "list or watch objects of kind StatefulSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "listNamespacedStatefulSet", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StatefulSetList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a StatefulSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "createNamespacedStatefulSet", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.StatefulSet" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StatefulSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of StatefulSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "deleteCollectionNamespacedStatefulSet", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}": { + "get": { + "description": "read the specified StatefulSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "readNamespacedStatefulSet", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StatefulSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified StatefulSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "replaceNamespacedStatefulSet", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.StatefulSet" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StatefulSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a StatefulSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "deleteNamespacedStatefulSet", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified StatefulSet", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "patchNamespacedStatefulSet", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StatefulSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the StatefulSet", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/status": { + "get": { + "description": "read status of the specified StatefulSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "readNamespacedStatefulSetStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StatefulSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified StatefulSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "replaceNamespacedStatefulSetStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.StatefulSet" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StatefulSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified StatefulSet", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "patchNamespacedStatefulSetStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StatefulSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the StatefulSet", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/statefulsets": { + "get": { + "description": "list or watch objects of kind StatefulSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "apps_v1beta1" + ], + "operationId": "listStatefulSetForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StatefulSetList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/watch/deployments": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/watch/namespaces/{namespace}/deployments": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/watch/namespaces/{namespace}/deployments/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Deployment", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/watch/namespaces/{namespace}/statefulsets": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/watch/namespaces/{namespace}/statefulsets/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the StatefulSet", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/apps/v1beta1/watch/statefulsets": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/authentication.k8s.io/": { + "get": { + "description": "get information of a group", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authentication" + ], + "operationId": "getAPIGroup", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/authentication.k8s.io/v1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authentication_v1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/authentication.k8s.io/v1/tokenreviews": { + "post": { + "description": "create a TokenReview", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authentication_v1" + ], + "operationId": "createTokenReview", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.TokenReview" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.TokenReview" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/authentication.k8s.io/v1beta1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authentication_v1beta1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/authentication.k8s.io/v1beta1/tokenreviews": { + "post": { + "description": "create a TokenReview", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authentication_v1beta1" + ], + "operationId": "createTokenReview", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.TokenReview" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.TokenReview" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/authorization.k8s.io/": { + "get": { + "description": "get information of a group", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authorization" + ], + "operationId": "getAPIGroup", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/authorization.k8s.io/v1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authorization_v1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews": { + "post": { + "description": "create a LocalSubjectAccessReview", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authorization_v1" + ], + "operationId": "createNamespacedLocalSubjectAccessReview", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.LocalSubjectAccessReview" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.LocalSubjectAccessReview" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": { + "post": { + "description": "create a SelfSubjectAccessReview", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authorization_v1" + ], + "operationId": "createSelfSubjectAccessReview", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.SelfSubjectAccessReview" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.SelfSubjectAccessReview" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/authorization.k8s.io/v1/subjectaccessreviews": { + "post": { + "description": "create a SubjectAccessReview", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authorization_v1" + ], + "operationId": "createSubjectAccessReview", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.SubjectAccessReview" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.SubjectAccessReview" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/authorization.k8s.io/v1beta1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authorization_v1beta1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/authorization.k8s.io/v1beta1/namespaces/{namespace}/localsubjectaccessreviews": { + "post": { + "description": "create a LocalSubjectAccessReview", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authorization_v1beta1" + ], + "operationId": "createNamespacedLocalSubjectAccessReview", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.LocalSubjectAccessReview" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.LocalSubjectAccessReview" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/authorization.k8s.io/v1beta1/selfsubjectaccessreviews": { + "post": { + "description": "create a SelfSubjectAccessReview", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authorization_v1beta1" + ], + "operationId": "createSelfSubjectAccessReview", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.SelfSubjectAccessReview" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.SelfSubjectAccessReview" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/authorization.k8s.io/v1beta1/subjectaccessreviews": { + "post": { + "description": "create a SubjectAccessReview", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "authorization_v1beta1" + ], + "operationId": "createSubjectAccessReview", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.SubjectAccessReview" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.SubjectAccessReview" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/autoscaling/": { + "get": { + "description": "get information of a group", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling" + ], + "operationId": "getAPIGroup", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/autoscaling/v1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/autoscaling/v1/horizontalpodautoscalers": { + "get": { + "description": "list or watch objects of kind HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "listHorizontalPodAutoscalerForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscalerList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers": { + "get": { + "description": "list or watch objects of kind HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "listNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscalerList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "createNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "deleteCollectionNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "get": { + "description": "read the specified HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "readNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "replaceNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "deleteNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified HorizontalPodAutoscaler", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "patchNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the HorizontalPodAutoscaler", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { + "get": { + "description": "read status of the specified HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "readNamespacedHorizontalPodAutoscalerStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "replaceNamespacedHorizontalPodAutoscalerStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified HorizontalPodAutoscaler", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v1" + ], + "operationId": "patchNamespacedHorizontalPodAutoscalerStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the HorizontalPodAutoscaler", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/autoscaling/v1/watch/horizontalpodautoscalers": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the HorizontalPodAutoscaler", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/autoscaling/v2alpha1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v2alpha1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/autoscaling/v2alpha1/horizontalpodautoscalers": { + "get": { + "description": "list or watch objects of kind HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v2alpha1" + ], + "operationId": "listHorizontalPodAutoscalerForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscalerList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers": { + "get": { + "description": "list or watch objects of kind HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v2alpha1" + ], + "operationId": "listNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscalerList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v2alpha1" + ], + "operationId": "createNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscaler" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v2alpha1" + ], + "operationId": "deleteCollectionNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "get": { + "description": "read the specified HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v2alpha1" + ], + "operationId": "readNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v2alpha1" + ], + "operationId": "replaceNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscaler" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v2alpha1" + ], + "operationId": "deleteNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified HorizontalPodAutoscaler", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v2alpha1" + ], + "operationId": "patchNamespacedHorizontalPodAutoscaler", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the HorizontalPodAutoscaler", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/autoscaling/v2alpha1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { + "get": { + "description": "read status of the specified HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v2alpha1" + ], + "operationId": "readNamespacedHorizontalPodAutoscalerStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified HorizontalPodAutoscaler", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v2alpha1" + ], + "operationId": "replaceNamespacedHorizontalPodAutoscalerStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscaler" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified HorizontalPodAutoscaler", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "autoscaling_v2alpha1" + ], + "operationId": "patchNamespacedHorizontalPodAutoscalerStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscaler" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the HorizontalPodAutoscaler", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/autoscaling/v2alpha1/watch/horizontalpodautoscalers": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/autoscaling/v2alpha1/watch/namespaces/{namespace}/horizontalpodautoscalers": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/autoscaling/v2alpha1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the HorizontalPodAutoscaler", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/batch/": { + "get": { + "description": "get information of a group", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch" + ], + "operationId": "getAPIGroup", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/batch/v1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/batch/v1/jobs": { + "get": { + "description": "list or watch objects of kind Job", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "operationId": "listJobForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.JobList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/batch/v1/namespaces/{namespace}/jobs": { + "get": { + "description": "list or watch objects of kind Job", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "operationId": "listNamespacedJob", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.JobList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a Job", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "operationId": "createNamespacedJob", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Job" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Job", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "operationId": "deleteCollectionNamespacedJob", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/batch/v1/namespaces/{namespace}/jobs/{name}": { + "get": { + "description": "read the specified Job", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "operationId": "readNamespacedJob", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Job", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "operationId": "replaceNamespacedJob", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Job" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a Job", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "operationId": "deleteNamespacedJob", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Job", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "operationId": "patchNamespacedJob", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Job", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status": { + "get": { + "description": "read status of the specified Job", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "operationId": "readNamespacedJobStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified Job", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "operationId": "replaceNamespacedJobStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.Job" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified Job", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v1" + ], + "operationId": "patchNamespacedJobStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Job" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Job", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/batch/v1/watch/jobs": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/batch/v1/watch/namespaces/{namespace}/jobs": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/batch/v1/watch/namespaces/{namespace}/jobs/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Job", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/batch/v2alpha1/cronjobs": { + "get": { + "description": "list or watch objects of kind CronJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "listCronJobForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJobList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs": { + "get": { + "description": "list or watch objects of kind CronJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "listNamespacedCronJob", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJobList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a CronJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "createNamespacedCronJob", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of CronJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "deleteCollectionNamespacedCronJob", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}": { + "get": { + "description": "read the specified CronJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "readNamespacedCronJob", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified CronJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "replaceNamespacedCronJob", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a CronJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "deleteNamespacedCronJob", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified CronJob", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "patchNamespacedCronJob", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the CronJob", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}/status": { + "get": { + "description": "read status of the specified CronJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "readNamespacedCronJobStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified CronJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "replaceNamespacedCronJobStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified CronJob", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "patchNamespacedCronJobStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the CronJob", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs": { + "get": { + "description": "list or watch objects of kind ScheduledJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "listNamespacedScheduledJob", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJobList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ScheduledJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "createNamespacedScheduledJob", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ScheduledJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "deleteCollectionNamespacedScheduledJob", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs/{name}": { + "get": { + "description": "read the specified ScheduledJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "readNamespacedScheduledJob", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ScheduledJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "replaceNamespacedScheduledJob", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ScheduledJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "deleteNamespacedScheduledJob", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ScheduledJob", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "patchNamespacedScheduledJob", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ScheduledJob", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/namespaces/{namespace}/scheduledjobs/{name}/status": { + "get": { + "description": "read status of the specified ScheduledJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "readNamespacedScheduledJobStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified ScheduledJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "replaceNamespacedScheduledJobStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified ScheduledJob", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "patchNamespacedScheduledJobStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ScheduledJob", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/scheduledjobs": { + "get": { + "description": "list or watch objects of kind ScheduledJob", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "batch_v2alpha1" + ], + "operationId": "listScheduledJobForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v2alpha1.CronJobList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/watch/cronjobs": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/watch/namespaces/{namespace}/cronjobs": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/watch/namespaces/{namespace}/cronjobs/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the CronJob", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/watch/namespaces/{namespace}/scheduledjobs": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/watch/namespaces/{namespace}/scheduledjobs/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ScheduledJob", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/batch/v2alpha1/watch/scheduledjobs": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/certificates.k8s.io/": { + "get": { + "description": "get information of a group", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "certificates" + ], + "operationId": "getAPIGroup", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/certificates.k8s.io/v1beta1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1beta1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests": { + "get": { + "description": "list or watch objects of kind CertificateSigningRequest", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1beta1" + ], + "operationId": "listCertificateSigningRequest", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequestList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a CertificateSigningRequest", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1beta1" + ], + "operationId": "createCertificateSigningRequest", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of CertificateSigningRequest", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1beta1" + ], + "operationId": "deleteCollectionCertificateSigningRequest", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}": { + "get": { + "description": "read the specified CertificateSigningRequest", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1beta1" + ], + "operationId": "readCertificateSigningRequest", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified CertificateSigningRequest", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1beta1" + ], + "operationId": "replaceCertificateSigningRequest", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a CertificateSigningRequest", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1beta1" + ], + "operationId": "deleteCertificateSigningRequest", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified CertificateSigningRequest", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1beta1" + ], + "operationId": "patchCertificateSigningRequest", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the CertificateSigningRequest", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/approval": { + "put": { + "description": "replace approval of the specified CertificateSigningRequest", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1beta1" + ], + "operationId": "replaceCertificateSigningRequestApproval", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the CertificateSigningRequest", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/status": { + "put": { + "description": "replace status of the specified CertificateSigningRequest", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "certificates_v1beta1" + ], + "operationId": "replaceCertificateSigningRequestStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the CertificateSigningRequest", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/certificates.k8s.io/v1beta1/watch/certificatesigningrequests": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/certificates.k8s.io/v1beta1/watch/certificatesigningrequests/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the CertificateSigningRequest", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/": { + "get": { + "description": "get information of a group", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions" + ], + "operationId": "getAPIGroup", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/extensions/v1beta1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/extensions/v1beta1/daemonsets": { + "get": { + "description": "list or watch objects of kind DaemonSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "listDaemonSetForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.DaemonSetList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/deployments": { + "get": { + "description": "list or watch objects of kind Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "listDeploymentForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.DeploymentList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/ingresses": { + "get": { + "description": "list or watch objects of kind Ingress", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "listIngressForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.IngressList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets": { + "get": { + "description": "list or watch objects of kind DaemonSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "listNamespacedDaemonSet", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.DaemonSetList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a DaemonSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "createNamespacedDaemonSet", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.DaemonSet" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.DaemonSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of DaemonSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteCollectionNamespacedDaemonSet", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}": { + "get": { + "description": "read the specified DaemonSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readNamespacedDaemonSet", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.DaemonSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified DaemonSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceNamespacedDaemonSet", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.DaemonSet" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.DaemonSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a DaemonSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteNamespacedDaemonSet", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified DaemonSet", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchNamespacedDaemonSet", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.DaemonSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the DaemonSet", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status": { + "get": { + "description": "read status of the specified DaemonSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readNamespacedDaemonSetStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.DaemonSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified DaemonSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceNamespacedDaemonSetStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.DaemonSet" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.DaemonSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified DaemonSet", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchNamespacedDaemonSetStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.DaemonSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the DaemonSet", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/deployments": { + "get": { + "description": "list or watch objects of kind Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "listNamespacedDeployment", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.DeploymentList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "createNamespacedDeployment", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Deployment" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteCollectionNamespacedDeployment", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}": { + "get": { + "description": "read the specified Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readNamespacedDeployment", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceNamespacedDeployment", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Deployment" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteNamespacedDeployment", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Deployment", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchNamespacedDeployment", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Deployment", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/rollback": { + "post": { + "description": "create rollback of a DeploymentRollback", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "createNamespacedDeploymentRollbackRollback", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/extensions.v1beta1.DeploymentRollback" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.DeploymentRollback" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the DeploymentRollback", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale": { + "get": { + "description": "read scale of the specified Scale", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readNamespacedDeploymentsScale", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace scale of the specified Scale", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceNamespacedDeploymentsScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Scale" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update scale of the specified Scale", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchNamespacedDeploymentsScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Scale", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/status": { + "get": { + "description": "read status of the specified Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readNamespacedDeploymentStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified Deployment", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceNamespacedDeploymentStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Deployment" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified Deployment", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchNamespacedDeploymentStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Deployment" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Deployment", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses": { + "get": { + "description": "list or watch objects of kind Ingress", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "listNamespacedIngress", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.IngressList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create an Ingress", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "createNamespacedIngress", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.Ingress" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Ingress" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Ingress", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteCollectionNamespacedIngress", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}": { + "get": { + "description": "read the specified Ingress", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readNamespacedIngress", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Ingress" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Ingress", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceNamespacedIngress", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.Ingress" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Ingress" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete an Ingress", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteNamespacedIngress", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Ingress", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchNamespacedIngress", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Ingress" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Ingress", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status": { + "get": { + "description": "read status of the specified Ingress", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readNamespacedIngressStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Ingress" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified Ingress", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceNamespacedIngressStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.Ingress" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Ingress" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified Ingress", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchNamespacedIngressStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Ingress" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Ingress", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies": { + "get": { + "description": "list or watch objects of kind NetworkPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "listNamespacedNetworkPolicy", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.NetworkPolicyList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a NetworkPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "createNamespacedNetworkPolicy", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.NetworkPolicy" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.NetworkPolicy" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of NetworkPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteCollectionNamespacedNetworkPolicy", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}": { + "get": { + "description": "read the specified NetworkPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readNamespacedNetworkPolicy", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.NetworkPolicy" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified NetworkPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceNamespacedNetworkPolicy", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.NetworkPolicy" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.NetworkPolicy" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a NetworkPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteNamespacedNetworkPolicy", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified NetworkPolicy", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchNamespacedNetworkPolicy", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.NetworkPolicy" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the NetworkPolicy", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/replicasets": { + "get": { + "description": "list or watch objects of kind ReplicaSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "listNamespacedReplicaSet", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ReplicaSetList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ReplicaSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "createNamespacedReplicaSet", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ReplicaSet" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ReplicaSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ReplicaSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteCollectionNamespacedReplicaSet", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}": { + "get": { + "description": "read the specified ReplicaSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readNamespacedReplicaSet", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ReplicaSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ReplicaSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceNamespacedReplicaSet", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ReplicaSet" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ReplicaSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ReplicaSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteNamespacedReplicaSet", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ReplicaSet", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchNamespacedReplicaSet", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ReplicaSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ReplicaSet", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/scale": { + "get": { + "description": "read scale of the specified Scale", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readNamespacedReplicasetsScale", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace scale of the specified Scale", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceNamespacedReplicasetsScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Scale" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update scale of the specified Scale", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchNamespacedReplicasetsScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Scale", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/status": { + "get": { + "description": "read status of the specified ReplicaSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readNamespacedReplicaSetStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ReplicaSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified ReplicaSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceNamespacedReplicaSetStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ReplicaSet" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ReplicaSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified ReplicaSet", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchNamespacedReplicaSetStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ReplicaSet" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ReplicaSet", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale": { + "get": { + "description": "read scale of the specified Scale", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readNamespacedReplicationcontrollersScale", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace scale of the specified Scale", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceNamespacedReplicationcontrollersScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Scale" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update scale of the specified Scale", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchNamespacedReplicationcontrollersScale", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/extensions.v1beta1.Scale" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Scale", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/networkpolicies": { + "get": { + "description": "list or watch objects of kind NetworkPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "listNetworkPolicyForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.NetworkPolicyList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/podsecuritypolicies": { + "get": { + "description": "list or watch objects of kind PodSecurityPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "listPodSecurityPolicy", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodSecurityPolicyList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a PodSecurityPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "createPodSecurityPolicy", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.PodSecurityPolicy" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodSecurityPolicy" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of PodSecurityPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteCollectionPodSecurityPolicy", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/podsecuritypolicies/{name}": { + "get": { + "description": "read the specified PodSecurityPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readPodSecurityPolicy", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodSecurityPolicy" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified PodSecurityPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replacePodSecurityPolicy", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.PodSecurityPolicy" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodSecurityPolicy" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a PodSecurityPolicy", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deletePodSecurityPolicy", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified PodSecurityPolicy", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchPodSecurityPolicy", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodSecurityPolicy" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the PodSecurityPolicy", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/replicasets": { + "get": { + "description": "list or watch objects of kind ReplicaSet", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "listReplicaSetForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ReplicaSetList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/thirdpartyresources": { + "get": { + "description": "list or watch objects of kind ThirdPartyResource", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "listThirdPartyResource", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ThirdPartyResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ThirdPartyResource", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "createThirdPartyResource", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ThirdPartyResource" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ThirdPartyResource" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ThirdPartyResource", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteCollectionThirdPartyResource", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/thirdpartyresources/{name}": { + "get": { + "description": "read the specified ThirdPartyResource", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "readThirdPartyResource", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ThirdPartyResource" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ThirdPartyResource", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "replaceThirdPartyResource", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ThirdPartyResource" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ThirdPartyResource" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ThirdPartyResource", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "deleteThirdPartyResource", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ThirdPartyResource", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "extensions_v1beta1" + ], + "operationId": "patchThirdPartyResource", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ThirdPartyResource" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ThirdPartyResource", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/daemonsets": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/deployments": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/ingresses": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/namespaces/{namespace}/daemonsets": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/namespaces/{namespace}/daemonsets/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the DaemonSet", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/namespaces/{namespace}/deployments": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/namespaces/{namespace}/deployments/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Deployment", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Ingress", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the NetworkPolicy", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/namespaces/{namespace}/replicasets": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/namespaces/{namespace}/replicasets/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ReplicaSet", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/networkpolicies": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/podsecuritypolicies": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/podsecuritypolicies/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the PodSecurityPolicy", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/replicasets": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/thirdpartyresources": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/extensions/v1beta1/watch/thirdpartyresources/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ThirdPartyResource", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/policy/": { + "get": { + "description": "get information of a group", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy" + ], + "operationId": "getAPIGroup", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/policy/v1beta1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy_v1beta1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets": { + "get": { + "description": "list or watch objects of kind PodDisruptionBudget", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy_v1beta1" + ], + "operationId": "listNamespacedPodDisruptionBudget", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudgetList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a PodDisruptionBudget", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy_v1beta1" + ], + "operationId": "createNamespacedPodDisruptionBudget", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudget" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudget" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of PodDisruptionBudget", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy_v1beta1" + ], + "operationId": "deleteCollectionNamespacedPodDisruptionBudget", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}": { + "get": { + "description": "read the specified PodDisruptionBudget", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy_v1beta1" + ], + "operationId": "readNamespacedPodDisruptionBudget", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudget" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified PodDisruptionBudget", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy_v1beta1" + ], + "operationId": "replaceNamespacedPodDisruptionBudget", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudget" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudget" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a PodDisruptionBudget", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy_v1beta1" + ], + "operationId": "deleteNamespacedPodDisruptionBudget", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified PodDisruptionBudget", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy_v1beta1" + ], + "operationId": "patchNamespacedPodDisruptionBudget", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudget" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the PodDisruptionBudget", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status": { + "get": { + "description": "read status of the specified PodDisruptionBudget", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy_v1beta1" + ], + "operationId": "readNamespacedPodDisruptionBudgetStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudget" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace status of the specified PodDisruptionBudget", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy_v1beta1" + ], + "operationId": "replaceNamespacedPodDisruptionBudgetStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudget" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudget" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update status of the specified PodDisruptionBudget", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy_v1beta1" + ], + "operationId": "patchNamespacedPodDisruptionBudgetStatus", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudget" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the PodDisruptionBudget", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/policy/v1beta1/poddisruptionbudgets": { + "get": { + "description": "list or watch objects of kind PodDisruptionBudget", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "policy_v1beta1" + ], + "operationId": "listPodDisruptionBudgetForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudgetList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/policy/v1beta1/watch/namespaces/{namespace}/poddisruptionbudgets": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/policy/v1beta1/watch/namespaces/{namespace}/poddisruptionbudgets/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the PodDisruptionBudget", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/policy/v1beta1/watch/poddisruptionbudgets": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/": { + "get": { + "description": "get information of a group", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization" + ], + "operationId": "getAPIGroup", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings": { + "get": { + "description": "list or watch objects of kind ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "listClusterRoleBinding", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRoleBindingList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "createClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "deleteCollectionClusterRoleBinding", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}": { + "get": { + "description": "read the specified ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "readClusterRoleBinding", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "replaceClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "deleteClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ClusterRoleBinding", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "patchClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ClusterRoleBinding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles": { + "get": { + "description": "list or watch objects of kind ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "listClusterRole", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRoleList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "createClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRole" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRole" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "deleteCollectionClusterRole", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}": { + "get": { + "description": "read the specified ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "readClusterRole", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRole" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "replaceClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRole" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRole" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "deleteClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ClusterRole", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "patchClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.ClusterRole" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ClusterRole", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings": { + "get": { + "description": "list or watch objects of kind RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "listNamespacedRoleBinding", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.RoleBindingList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "createNamespacedRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.RoleBinding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.RoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "deleteCollectionNamespacedRoleBinding", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}": { + "get": { + "description": "read the specified RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "readNamespacedRoleBinding", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.RoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "replaceNamespacedRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.RoleBinding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.RoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "deleteNamespacedRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified RoleBinding", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "patchNamespacedRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.RoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the RoleBinding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles": { + "get": { + "description": "list or watch objects of kind Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "listNamespacedRole", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.RoleList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "createNamespacedRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.Role" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.Role" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "deleteCollectionNamespacedRole", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}": { + "get": { + "description": "read the specified Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "readNamespacedRole", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.Role" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "replaceNamespacedRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.Role" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.Role" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "deleteNamespacedRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Role", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "patchNamespacedRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.Role" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Role", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/rolebindings": { + "get": { + "description": "list or watch objects of kind RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "listRoleBindingForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.RoleBindingList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/roles": { + "get": { + "description": "list or watch objects of kind Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1alpha1" + ], + "operationId": "listRoleForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.RoleList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterrolebindings": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterrolebindings/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ClusterRoleBinding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterroles": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterroles/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ClusterRole", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{namespace}/rolebindings": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{namespace}/rolebindings/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the RoleBinding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{namespace}/roles": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{namespace}/roles/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Role", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/watch/rolebindings": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1alpha1/watch/roles": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings": { + "get": { + "description": "list or watch objects of kind ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "listClusterRoleBinding", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBindingList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "createClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteCollectionClusterRoleBinding", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}": { + "get": { + "description": "read the specified ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "readClusterRoleBinding", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "replaceClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ClusterRoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ClusterRoleBinding", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "patchClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ClusterRoleBinding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/clusterroles": { + "get": { + "description": "list or watch objects of kind ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "listClusterRole", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRoleList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "createClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteCollectionClusterRole", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}": { + "get": { + "description": "read the specified ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "readClusterRole", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "replaceClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a ClusterRole", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified ClusterRole", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "patchClusterRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the ClusterRole", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings": { + "get": { + "description": "list or watch objects of kind RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "listNamespacedRoleBinding", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleBindingList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "createNamespacedRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteCollectionNamespacedRoleBinding", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}": { + "get": { + "description": "read the specified RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "readNamespacedRoleBinding", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "replaceNamespacedRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteNamespacedRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified RoleBinding", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "patchNamespacedRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the RoleBinding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles": { + "get": { + "description": "list or watch objects of kind Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "listNamespacedRole", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "createNamespacedRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.Role" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Role" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteCollectionNamespacedRole", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}": { + "get": { + "description": "read the specified Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "readNamespacedRole", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Role" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "replaceNamespacedRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.Role" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Role" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "deleteNamespacedRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified Role", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "patchNamespacedRole", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.Role" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the Role", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/rolebindings": { + "get": { + "description": "list or watch objects of kind RoleBinding", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "listRoleBindingForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleBindingList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/roles": { + "get": { + "description": "list or watch objects of kind Role", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "rbacAuthorization_v1beta1" + ], + "operationId": "listRoleForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.RoleList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterrolebindings": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterrolebindings/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ClusterRoleBinding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterroles": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterroles/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the ClusterRole", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/rolebindings": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/rolebindings/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the RoleBinding", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/roles": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/roles/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the Role", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/rolebindings": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/rbac.authorization.k8s.io/v1beta1/watch/roles": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/settings.k8s.io/": { + "get": { + "description": "get information of a group", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "settings" + ], + "operationId": "getAPIGroup", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/settings.k8s.io/v1alpha1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "settings_v1alpha1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets": { + "get": { + "description": "list or watch objects of kind PodPreset", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "settings_v1alpha1" + ], + "operationId": "listNamespacedPodPreset", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.PodPresetList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a PodPreset", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "settings_v1alpha1" + ], + "operationId": "createNamespacedPodPreset", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.PodPreset" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.PodPreset" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of PodPreset", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "settings_v1alpha1" + ], + "operationId": "deleteCollectionNamespacedPodPreset", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}": { + "get": { + "description": "read the specified PodPreset", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "settings_v1alpha1" + ], + "operationId": "readNamespacedPodPreset", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.PodPreset" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified PodPreset", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "settings_v1alpha1" + ], + "operationId": "replaceNamespacedPodPreset", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1.PodPreset" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.PodPreset" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a PodPreset", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "settings_v1alpha1" + ], + "operationId": "deleteNamespacedPodPreset", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified PodPreset", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "settings_v1alpha1" + ], + "operationId": "patchNamespacedPodPreset", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.PodPreset" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the PodPreset", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/settings.k8s.io/v1alpha1/podpresets": { + "get": { + "description": "list or watch objects of kind PodPreset", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "settings_v1alpha1" + ], + "operationId": "listPodPresetForAllNamespaces", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1alpha1.PodPresetList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/settings.k8s.io/v1alpha1/watch/namespaces/{namespace}/podpresets": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/settings.k8s.io/v1alpha1/watch/namespaces/{namespace}/podpresets/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the PodPreset", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "object name and auth scope, such as for teams and projects", + "name": "namespace", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/settings.k8s.io/v1alpha1/watch/podpresets": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/storage.k8s.io/": { + "get": { + "description": "get information of a group", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage" + ], + "operationId": "getAPIGroup", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/storage.k8s.io/v1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/storage.k8s.io/v1/storageclasses": { + "get": { + "description": "list or watch objects of kind StorageClass", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "listStorageClass", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.StorageClassList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a StorageClass", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "createStorageClass", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.StorageClass" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.StorageClass" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of StorageClass", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "deleteCollectionStorageClass", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/storage.k8s.io/v1/storageclasses/{name}": { + "get": { + "description": "read the specified StorageClass", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "readStorageClass", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.StorageClass" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified StorageClass", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "replaceStorageClass", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.StorageClass" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.StorageClass" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a StorageClass", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "deleteStorageClass", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified StorageClass", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1" + ], + "operationId": "patchStorageClass", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.StorageClass" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the StorageClass", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/storage.k8s.io/v1/watch/storageclasses": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/storage.k8s.io/v1/watch/storageclasses/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the StorageClass", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/storage.k8s.io/v1beta1/": { + "get": { + "description": "get available resources", + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1beta1" + ], + "operationId": "getAPIResources", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.APIResourceList" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + }, + "/apis/storage.k8s.io/v1beta1/storageclasses": { + "get": { + "description": "list or watch objects of kind StorageClass", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1beta1" + ], + "operationId": "listStorageClass", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StorageClassList" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "post": { + "description": "create a StorageClass", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1beta1" + ], + "operationId": "createStorageClass", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.StorageClass" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StorageClass" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete collection of StorageClass", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1beta1" + ], + "operationId": "deleteCollectionStorageClass", + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/storage.k8s.io/v1beta1/storageclasses/{name}": { + "get": { + "description": "read the specified StorageClass", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1beta1" + ], + "operationId": "readStorageClass", + "parameters": [ + { + "uniqueItems": true, + "type": "boolean", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", + "name": "exact", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "name": "export", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StorageClass" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "put": { + "description": "replace the specified StorageClass", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1beta1" + ], + "operationId": "replaceStorageClass", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1.StorageClass" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StorageClass" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "description": "delete a StorageClass", + "consumes": [ + "*/*" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1beta1" + ], + "operationId": "deleteStorageClass", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DeleteOptions" + } + }, + { + "uniqueItems": true, + "type": "integer", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "name": "gracePeriodSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "name": "orphanDependents", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "name": "propagationPolicy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.Status" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "patch": { + "description": "partially update the specified StorageClass", + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "schemes": [ + "https" + ], + "tags": [ + "storage_v1beta1" + ], + "operationId": "patchStorageClass", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1beta1.StorageClass" + } + }, + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "name of the StorageClass", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + } + ] + }, + "/apis/storage.k8s.io/v1beta1/watch/storageclasses": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/apis/storage.k8s.io/v1beta1/watch/storageclasses/{name}": { + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "fieldSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "name": "labelSelector", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "name of the StorageClass", + "name": "name", + "in": "path", + "required": true + }, + { + "uniqueItems": true, + "type": "string", + "description": "If 'true', then the output is pretty printed.", + "name": "pretty", + "in": "query" + }, + { + "uniqueItems": true, + "type": "string", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "name": "resourceVersion", + "in": "query" + }, + { + "uniqueItems": true, + "type": "integer", + "description": "Timeout for the list/watch call.", + "name": "timeoutSeconds", + "in": "query" + }, + { + "uniqueItems": true, + "type": "boolean", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "watch", + "in": "query" + } + ] + }, + "/logs/": { + "get": { + "schemes": [ + "https" + ], + "tags": [ + "logs" + ], + "operationId": "logFileListHandler", + "responses": { + "401": { + "description": "Unauthorized" + } + } + } + }, + "/logs/{logpath}": { + "get": { + "schemes": [ + "https" + ], + "tags": [ + "logs" + ], + "operationId": "logFileHandler", + "responses": { + "401": { + "description": "Unauthorized" + } + } + }, + "parameters": [ + { + "uniqueItems": true, + "type": "string", + "description": "path to the log", + "name": "logpath", + "in": "path", + "required": true + } + ] + }, + "/version/": { + "get": { + "description": "get the code version", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "schemes": [ + "https" + ], + "tags": [ + "version" + ], + "operationId": "getCode", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/version.Info" + } + }, + "401": { + "description": "Unauthorized" + } + } + } + } + }, + "definitions": { + "v1.NonResourceAttributes": { + "description": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", + "properties": { + "path": { + "description": "Path is the URL path of the request", + "type": "string" + }, + "verb": { + "description": "Verb is the standard HTTP verb", + "type": "string" + } + } + }, + "v1.EndpointAddress": { + "description": "EndpointAddress is a tuple that describes single IP address.", + "required": [ + "ip" + ], + "properties": { + "hostname": { + "description": "The Hostname of this endpoint", + "type": "string" + }, + "ip": { + "description": "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.", + "type": "string" + }, + "nodeName": { + "description": "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", + "type": "string" + }, + "targetRef": { + "description": "Reference to object providing the endpoint.", + "$ref": "#/definitions/v1.ObjectReference" + } + } + }, + "v1.ContainerImage": { + "description": "Describe a container image", + "required": [ + "names" + ], + "properties": { + "names": { + "description": "Names by which this image is known. e.g. [\"gcr.io/google_containers/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", + "type": "array", + "items": { + "type": "string" + } + }, + "sizeBytes": { + "description": "The size of the image in bytes.", + "type": "integer", + "format": "int64" + } + } + }, + "apps.v1beta1.RollbackConfig": { + "properties": { + "revision": { + "description": "The revision to rollback to. If set to 0, rollbck to the last revision.", + "type": "integer", + "format": "int64" + } + } + }, + "extensions.v1beta1.RollingUpdateDeployment": { + "description": "Spec to control the desired behavior of rolling update.", + "properties": { + "maxSurge": { + "description": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. By default, a value of 1 is used. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", + "type": "string", + "format": "int-or-string" + }, + "maxUnavailable": { + "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + "type": "string", + "format": "int-or-string" + } + } + }, + "v1.APIResource": { + "description": "APIResource specifies the name of a resource and whether it is namespaced.", + "required": [ + "name", + "namespaced", + "kind", + "verbs" + ], + "properties": { + "kind": { + "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + "type": "string" + }, + "name": { + "description": "name is the name of the resource.", + "type": "string" + }, + "namespaced": { + "description": "namespaced indicates if a resource is namespaced or not.", + "type": "boolean" + }, + "shortNames": { + "description": "shortNames is a list of suggested short names of the resource.", + "type": "array", + "items": { + "type": "string" + } + }, + "verbs": { + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.Lifecycle": { + "description": "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", + "properties": { + "postStart": { + "description": "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: http://kubernetes.io/docs/user-guide/container-environment#hook-details", + "$ref": "#/definitions/v1.Handler" + }, + "preStop": { + "description": "PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: http://kubernetes.io/docs/user-guide/container-environment#hook-details", + "$ref": "#/definitions/v1.Handler" + } + } + }, + "v1.AzureDiskVolumeSource": { + "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "required": [ + "diskName", + "diskURI" + ], + "properties": { + "cachingMode": { + "description": "Host Caching mode: None, Read Only, Read Write.", + "type": "string" + }, + "diskName": { + "description": "The Name of the data disk in the blob storage", + "type": "string" + }, + "diskURI": { + "description": "The URI the data disk in the blob storage", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + } + } + }, + "v1beta1.StatefulSet": { + "description": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the desired identities of pods in this set.", + "$ref": "#/definitions/v1beta1.StatefulSetSpec" + }, + "status": { + "description": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", + "$ref": "#/definitions/v1beta1.StatefulSetStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "apps", + "Version": "v1beta1", + "Kind": "StatefulSet" + } + ] + }, + "v1beta1.APIVersion": { + "description": "An APIVersion represents a single concrete version of an object model.", + "properties": { + "name": { + "description": "Name of this version (e.g. 'v1').", + "type": "string" + } + } + }, + "v1.UserInfo": { + "description": "UserInfo holds the information about the user needed to implement the user.Info interface.", + "properties": { + "extra": { + "description": "Any additional information provided by the authenticator.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "groups": { + "description": "The names of groups this user is a part of.", + "type": "array", + "items": { + "type": "string" + } + }, + "uid": { + "description": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", + "type": "string" + }, + "username": { + "description": "The name that uniquely identifies this user among all active users.", + "type": "string" + } + } + }, + "v1.ServiceSpec": { + "description": "ServiceSpec describes the attributes that a user creates on a service.", + "properties": { + "clusterIP": { + "description": "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies", + "type": "string" + }, + "deprecatedPublicIPs": { + "description": "deprecatedPublicIPs is deprecated and replaced by the externalIPs field with almost the exact same semantics. This field is retained in the v1 API for compatibility until at least 8/20/2016. It will be removed from any new API revisions. If both deprecatedPublicIPs *and* externalIPs are set, deprecatedPublicIPs is used.", + "type": "array", + "items": { + "type": "string" + } + }, + "externalIPs": { + "description": "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. A previous form of this functionality exists as the deprecatedPublicIPs field. When using this field, callers should also clear the deprecatedPublicIPs field.", + "type": "array", + "items": { + "type": "string" + } + }, + "externalName": { + "description": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName.", + "type": "string" + }, + "loadBalancerIP": { + "description": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.", + "type": "string" + }, + "loadBalancerSourceRanges": { + "description": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: http://kubernetes.io/docs/user-guide/services-firewalls", + "type": "array", + "items": { + "type": "string" + } + }, + "ports": { + "description": "The list of ports that are exposed by this service. More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ServicePort" + } + }, + "selector": { + "description": "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: http://kubernetes.io/docs/user-guide/services#overview", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: http://kubernetes.io/docs/user-guide/services#virtual-ips-and-service-proxies", + "type": "string" + }, + "type": { + "description": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: http://kubernetes.io/docs/user-guide/services#overview", + "type": "string" + } + } + }, + "extensions.v1beta1.Deployment": { + "description": "Deployment enables declarative updates for Pods and ReplicaSets.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the Deployment.", + "$ref": "#/definitions/extensions.v1beta1.DeploymentSpec" + }, + "status": { + "description": "Most recently observed status of the Deployment.", + "$ref": "#/definitions/extensions.v1beta1.DeploymentStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "Deployment" + } + ] + }, + "v1.DeleteOptions": { + "description": "DeleteOptions may be provided when deleting an API object.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "gracePeriodSeconds": { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "type": "integer", + "format": "int64" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "orphanDependents": { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "type": "boolean" + }, + "preconditions": { + "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + "$ref": "#/definitions/v1.Preconditions" + }, + "propagationPolicy": { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "type": "string" + } + } + }, + "v1.ConfigMapList": { + "description": "ConfigMapList is a resource containing a list of ConfigMap objects.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of ConfigMaps.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ConfigMap" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "ConfigMapList" + } + ] + }, + "v1.JobSpec": { + "description": "JobSpec describes how the job execution will look like.", + "required": [ + "template" + ], + "properties": { + "activeDeadlineSeconds": { + "description": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer", + "type": "integer", + "format": "int64" + }, + "completions": { + "description": "Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://kubernetes.io/docs/user-guide/jobs", + "type": "integer", + "format": "int32" + }, + "manualSelector": { + "description": "ManualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md", + "type": "boolean" + }, + "parallelism": { + "description": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://kubernetes.io/docs/user-guide/jobs", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "$ref": "#/definitions/v1.LabelSelector" + }, + "template": { + "description": "Template is the object that describes the pod that will be created when executing a job. More info: http://kubernetes.io/docs/user-guide/jobs", + "$ref": "#/definitions/v1.PodTemplateSpec" + } + } + }, + "apps.v1beta1.DeploymentCondition": { + "description": "DeploymentCondition describes the state of a deployment at a certain point.", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "type": "string", + "format": "date-time" + }, + "lastUpdateTime": { + "description": "The last time this condition was updated.", + "type": "string", + "format": "date-time" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of deployment condition.", + "type": "string" + } + } + }, + "v1.ContainerStateWaiting": { + "description": "ContainerStateWaiting is a waiting state of a container.", + "properties": { + "message": { + "description": "Message regarding why the container is not yet running.", + "type": "string" + }, + "reason": { + "description": "(brief) reason the container is not yet running.", + "type": "string" + } + } + }, + "v1alpha1.ClusterRole": { + "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + "required": [ + "rules" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "rules": { + "description": "Rules holds all the PolicyRules for this ClusterRole", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1.PolicyRule" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1alpha1", + "Kind": "ClusterRole" + } + ] + }, + "v1.LocalObjectReference": { + "description": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", + "properties": { + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + } + } + }, + "v1.ConfigMapProjection": { + "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + "properties": { + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or it's keys must be defined", + "type": "boolean" + } + } + }, + "v1.EndpointsList": { + "description": "EndpointsList is a list of endpoints.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of endpoints.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Endpoints" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "EndpointsList" + } + ] + }, + "v2alpha1.CronJobStatus": { + "description": "CronJobStatus represents the current state of a cron job.", + "properties": { + "active": { + "description": "Active holds pointers to currently running jobs.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ObjectReference" + } + }, + "lastScheduleTime": { + "description": "LastScheduleTime keeps information of when was the last time the job was successfully scheduled.", + "type": "string", + "format": "date-time" + } + } + }, + "v1.DownwardAPIProjection": { + "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + "properties": { + "items": { + "description": "Items is a list of DownwardAPIVolume file", + "type": "array", + "items": { + "$ref": "#/definitions/v1.DownwardAPIVolumeFile" + } + } + } + }, + "v1alpha1.PolicyRule": { + "description": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "required": [ + "verbs" + ], + "properties": { + "apiGroups": { + "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "nonResourceURLs": { + "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + "type": "array", + "items": { + "type": "string" + } + }, + "resourceNames": { + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + "type": "array", + "items": { + "type": "string" + } + }, + "verbs": { + "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v2alpha1.ResourceMetricStatus": { + "description": "ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "required": [ + "name", + "currentAverageValue" + ], + "properties": { + "currentAverageUtilization": { + "description": "currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", + "type": "integer", + "format": "int32" + }, + "currentAverageValue": { + "description": "currentAverageValue is the the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type. It will always be set, regardless of the corresponding metric specification.", + "type": "string" + }, + "name": { + "description": "name is the name of the resource in question.", + "type": "string" + } + } + }, + "v1.QuobyteVolumeSource": { + "description": "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.", + "required": [ + "registry", + "volume" + ], + "properties": { + "group": { + "description": "Group to map volume access to Default is no group", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.", + "type": "boolean" + }, + "registry": { + "description": "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes", + "type": "string" + }, + "user": { + "description": "User to map volume access to Defaults to serivceaccount user", + "type": "string" + }, + "volume": { + "description": "Volume is a string that references an already created Quobyte volume by name.", + "type": "string" + } + } + }, + "v1.SELinuxOptions": { + "description": "SELinuxOptions are the labels to be applied to the container", + "properties": { + "level": { + "description": "Level is SELinux level label that applies to the container.", + "type": "string" + }, + "role": { + "description": "Role is a SELinux role label that applies to the container.", + "type": "string" + }, + "type": { + "description": "Type is a SELinux type label that applies to the container.", + "type": "string" + }, + "user": { + "description": "User is a SELinux user label that applies to the container.", + "type": "string" + } + } + }, + "v1.HorizontalPodAutoscaler": { + "description": "configuration of a horizontal pod autoscaler.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", + "$ref": "#/definitions/v1.HorizontalPodAutoscalerSpec" + }, + "status": { + "description": "current information about the autoscaler.", + "$ref": "#/definitions/v1.HorizontalPodAutoscalerStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "autoscaling", + "Version": "v1", + "Kind": "HorizontalPodAutoscaler" + } + ] + }, + "v1beta1.ThirdPartyResource": { + "description": "A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource types to the API. It consists of one or more Versions of the api.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "description": { + "description": "Description is the description of this object.", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "versions": { + "description": "Versions are versions for this third party object", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.APIVersion" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "ThirdPartyResource" + } + ] + }, + "v1beta1.RunAsUserStrategyOptions": { + "description": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.", + "required": [ + "rule" + ], + "properties": { + "ranges": { + "description": "Ranges are the allowed ranges of uids that may be used.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.IDRange" + } + }, + "rule": { + "description": "Rule is the strategy that will dictate the allowable RunAsUser values that may be set.", + "type": "string" + } + } + }, + "v1.ResourceRequirements": { + "description": "ResourceRequirements describes the compute resource requirements.", + "properties": { + "limits": { + "description": "Limits describes the maximum amount of compute resources allowed. More info: http://kubernetes.io/docs/user-guide/compute-resources/", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "requests": { + "description": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: http://kubernetes.io/docs/user-guide/compute-resources/", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1.PersistentVolume": { + "description": "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: http://kubernetes.io/docs/user-guide/persistent-volumes", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes", + "$ref": "#/definitions/v1.PersistentVolumeSpec" + }, + "status": { + "description": "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistent-volumes", + "$ref": "#/definitions/v1.PersistentVolumeStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "PersistentVolume" + } + ] + }, + "v1.APIResourceList": { + "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + "required": [ + "groupVersion", + "resources" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "groupVersion": { + "description": "groupVersion is the group and version this APIResourceList is for.", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "resources": { + "description": "resources contains the name of the resources and if they are namespaced.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.APIResource" + } + } + } + }, + "v1.ScaleIOVolumeSource": { + "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", + "required": [ + "gateway", + "system", + "secretRef" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "gateway": { + "description": "The host address of the ScaleIO API Gateway.", + "type": "string" + }, + "protectionDomain": { + "description": "The name of the Protection Domain for the configured storage (defaults to \"default\").", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "sslEnabled": { + "description": "Flag to enable/disable SSL communication with Gateway, default false", + "type": "boolean" + }, + "storageMode": { + "description": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\").", + "type": "string" + }, + "storagePool": { + "description": "The Storage Pool associated with the protection domain (defaults to \"default\").", + "type": "string" + }, + "system": { + "description": "The name of the storage system as configured in ScaleIO.", + "type": "string" + }, + "volumeName": { + "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source.", + "type": "string" + } + } + }, + "v1.DaemonEndpoint": { + "description": "DaemonEndpoint contains information about a single Daemon endpoint.", + "required": [ + "Port" + ], + "properties": { + "Port": { + "description": "Port number of the given endpoint.", + "type": "integer", + "format": "int32" + } + } + }, + "v2alpha1.MetricSpec": { + "description": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", + "required": [ + "type" + ], + "properties": { + "object": { + "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + "$ref": "#/definitions/v2alpha1.ObjectMetricSource" + }, + "pods": { + "description": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "$ref": "#/definitions/v2alpha1.PodsMetricSource" + }, + "resource": { + "description": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "$ref": "#/definitions/v2alpha1.ResourceMetricSource" + }, + "type": { + "description": "type is the type of metric source. It should match one of the fields below.", + "type": "string" + } + } + }, + "v1.ReplicationControllerList": { + "description": "ReplicationControllerList is a collection of replication controllers.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of replication controllers. More info: http://kubernetes.io/docs/user-guide/replication-controller", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ReplicationController" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "ReplicationControllerList" + } + ] + }, + "v1beta1.IngressTLS": { + "description": "IngressTLS describes the transport layer security associated with an Ingress.", + "properties": { + "hosts": { + "description": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + "type": "array", + "items": { + "type": "string" + } + }, + "secretName": { + "description": "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", + "type": "string" + } + } + }, + "extensions.v1beta1.ScaleSpec": { + "description": "describes the attributes of a scale subresource", + "properties": { + "replicas": { + "description": "desired number of instances for the scaled object.", + "type": "integer", + "format": "int32" + } + } + }, + "v2alpha1.ObjectMetricSource": { + "description": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "required": [ + "target", + "metricName", + "targetValue" + ], + "properties": { + "metricName": { + "description": "metricName is the name of the metric in question.", + "type": "string" + }, + "target": { + "description": "target is the described Kubernetes object.", + "$ref": "#/definitions/v2alpha1.CrossVersionObjectReference" + }, + "targetValue": { + "description": "targetValue is the target value of the metric (as a quantity).", + "type": "string" + } + } + }, + "v1.FlockerVolumeSource": { + "description": "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.", + "properties": { + "datasetName": { + "description": "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated", + "type": "string" + }, + "datasetUUID": { + "description": "UUID of the dataset. This is unique identifier of a Flocker dataset", + "type": "string" + } + } + }, + "v1.HorizontalPodAutoscalerStatus": { + "description": "current status of a horizontal pod autoscaler", + "required": [ + "currentReplicas", + "desiredReplicas" + ], + "properties": { + "currentCPUUtilizationPercentage": { + "description": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.", + "type": "integer", + "format": "int32" + }, + "currentReplicas": { + "description": "current number of replicas of pods managed by this autoscaler.", + "type": "integer", + "format": "int32" + }, + "desiredReplicas": { + "description": "desired number of replicas of pods managed by this autoscaler.", + "type": "integer", + "format": "int32" + }, + "lastScaleTime": { + "description": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", + "type": "string", + "format": "date-time" + }, + "observedGeneration": { + "description": "most recent generation observed by this autoscaler.", + "type": "integer", + "format": "int64" + } + } + }, + "v1.CrossVersionObjectReference": { + "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", + "required": [ + "kind", + "name" + ], + "properties": { + "apiVersion": { + "description": "API version of the referent", + "type": "string" + }, + "kind": { + "description": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds\"", + "type": "string" + }, + "name": { + "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + } + } + }, + "apps.v1beta1.DeploymentStatus": { + "description": "DeploymentStatus is the most recently observed status of the Deployment.", + "properties": { + "availableReplicas": { + "description": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Represents the latest available observations of a deployment's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/apps.v1beta1.DeploymentCondition" + } + }, + "observedGeneration": { + "description": "The generation observed by the deployment controller.", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "Total number of ready pods targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + "type": "integer", + "format": "int32" + }, + "unavailableReplicas": { + "description": "Total number of unavailable pods targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "updatedReplicas": { + "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + "type": "integer", + "format": "int32" + } + } + }, + "v1beta1.PodDisruptionBudgetList": { + "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.PodDisruptionBudget" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "policy", + "Version": "v1beta1", + "Kind": "PodDisruptionBudgetList" + } + ] + }, + "extensions.v1beta1.DeploymentStrategy": { + "description": "DeploymentStrategy describes how to replace existing pods with new ones.", + "properties": { + "rollingUpdate": { + "description": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", + "$ref": "#/definitions/extensions.v1beta1.RollingUpdateDeployment" + }, + "type": { + "description": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", + "type": "string" + } + } + }, + "v1.ContainerStatus": { + "description": "ContainerStatus contains details for the current status of this container.", + "required": [ + "name", + "ready", + "restartCount", + "image", + "imageID" + ], + "properties": { + "containerID": { + "description": "Container's ID in the format 'docker://'. More info: http://kubernetes.io/docs/user-guide/container-environment#container-information", + "type": "string" + }, + "image": { + "description": "The image the container is running. More info: http://kubernetes.io/docs/user-guide/images", + "type": "string" + }, + "imageID": { + "description": "ImageID of the container's image.", + "type": "string" + }, + "lastState": { + "description": "Details about the container's last termination condition.", + "$ref": "#/definitions/v1.ContainerState" + }, + "name": { + "description": "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.", + "type": "string" + }, + "ready": { + "description": "Specifies whether the container has passed its readiness probe.", + "type": "boolean" + }, + "restartCount": { + "description": "The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.", + "type": "integer", + "format": "int32" + }, + "state": { + "description": "Details about the container's current condition.", + "$ref": "#/definitions/v1.ContainerState" + } + } + }, + "v2alpha1.ResourceMetricSource": { + "description": "ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source. Only one \"target\" type should be set.", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "name is the name of the resource in question.", + "type": "string" + }, + "targetAverageUtilization": { + "description": "targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.", + "type": "integer", + "format": "int32" + }, + "targetAverageValue": { + "description": "targetAverageValue is the the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the \"pods\" metric source type.", + "type": "string" + } + } + }, + "v1.ComponentStatus": { + "description": "ComponentStatus (and ComponentStatusList) holds the cluster validation info.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "conditions": { + "description": "List of component conditions observed", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ComponentCondition" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "ComponentStatus" + } + ] + }, + "v1.WeightedPodAffinityTerm": { + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "podAffinityTerm": { + "description": "Required. A pod affinity term, associated with the corresponding weight.", + "$ref": "#/definitions/v1.PodAffinityTerm" + }, + "weight": { + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.", + "type": "integer", + "format": "int32" + } + } + }, + "v1beta1.SubjectAccessReview": { + "description": "SubjectAccessReview checks whether or not a user or group can perform an action.", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated", + "$ref": "#/definitions/v1beta1.SubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/v1beta1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "authorization.k8s.io", + "Version": "v1beta1", + "Kind": "SubjectAccessReview" + } + ] + }, + "v1beta1.UserInfo": { + "description": "UserInfo holds the information about the user needed to implement the user.Info interface.", + "properties": { + "extra": { + "description": "Any additional information provided by the authenticator.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "groups": { + "description": "The names of groups this user is a part of.", + "type": "array", + "items": { + "type": "string" + } + }, + "uid": { + "description": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", + "type": "string" + }, + "username": { + "description": "The name that uniquely identifies this user among all active users.", + "type": "string" + } + } + }, + "v1.PersistentVolumeList": { + "description": "PersistentVolumeList is a list of PersistentVolume items.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of persistent volumes. More info: http://kubernetes.io/docs/user-guide/persistent-volumes", + "type": "array", + "items": { + "$ref": "#/definitions/v1.PersistentVolume" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "PersistentVolumeList" + } + ] + }, + "v1.ServerAddressByClientCIDR": { + "description": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", + "required": [ + "clientCIDR", + "serverAddress" + ], + "properties": { + "clientCIDR": { + "description": "The CIDR with which clients can match their IP to figure out the server address that they should use.", + "type": "string" + }, + "serverAddress": { + "description": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", + "type": "string" + } + } + }, + "v1beta1.Role": { + "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + "required": [ + "rules" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "rules": { + "description": "Rules holds all the PolicyRules for this Role", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.PolicyRule" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1beta1", + "Kind": "Role" + } + ] + }, + "v1.ScaleSpec": { + "description": "ScaleSpec describes the attributes of a scale subresource.", + "properties": { + "replicas": { + "description": "desired number of instances for the scaled object.", + "type": "integer", + "format": "int32" + } + } + }, + "v1.StatusCause": { + "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + "properties": { + "field": { + "description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", + "type": "string" + }, + "message": { + "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", + "type": "string" + }, + "reason": { + "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available.", + "type": "string" + } + } + }, + "v1beta1.DaemonSet": { + "description": "DaemonSet represents the configuration of a daemon set.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "The desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1beta1.DaemonSetSpec" + }, + "status": { + "description": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1beta1.DaemonSetStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "DaemonSet" + } + ] + }, + "extensions.v1beta1.DeploymentSpec": { + "description": "DeploymentSpec is the specification of the desired behavior of the Deployment.", + "required": [ + "template" + ], + "properties": { + "minReadySeconds": { + "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "type": "integer", + "format": "int32" + }, + "paused": { + "description": "Indicates that the deployment is paused and will not be processed by the deployment controller.", + "type": "boolean" + }, + "progressDeadlineSeconds": { + "description": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. This is not set by default.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + "type": "integer", + "format": "int32" + }, + "revisionHistoryLimit": { + "description": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.", + "type": "integer", + "format": "int32" + }, + "rollbackTo": { + "description": "The config this deployment is rolling back to. Will be cleared after rollback is done.", + "$ref": "#/definitions/extensions.v1beta1.RollbackConfig" + }, + "selector": { + "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", + "$ref": "#/definitions/v1.LabelSelector" + }, + "strategy": { + "description": "The deployment strategy to use to replace existing pods with new ones.", + "$ref": "#/definitions/extensions.v1beta1.DeploymentStrategy" + }, + "template": { + "description": "Template describes the pods that will be created.", + "$ref": "#/definitions/v1.PodTemplateSpec" + } + } + }, + "v1beta1.NonResourceAttributes": { + "description": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", + "properties": { + "path": { + "description": "Path is the URL path of the request", + "type": "string" + }, + "verb": { + "description": "Verb is the standard HTTP verb", + "type": "string" + } + } + }, + "v1.PodSecurityContext": { + "description": "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.", + "properties": { + "fsGroup": { + "description": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.", + "type": "integer", + "format": "int64" + }, + "runAsNonRoot": { + "description": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "type": "boolean" + }, + "runAsUser": { + "description": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + "type": "integer", + "format": "int64" + }, + "seLinuxOptions": { + "description": "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + "$ref": "#/definitions/v1.SELinuxOptions" + }, + "supplementalGroups": { + "description": "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + } + }, + "v1.ComponentStatusList": { + "description": "Status of all the conditions for the component as a list of ComponentStatus objects.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of ComponentStatus objects.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ComponentStatus" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "ComponentStatusList" + } + ] + }, + "v1alpha1.Subject": { + "description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + "required": [ + "kind", + "name" + ], + "properties": { + "apiVersion": { + "description": "APIVersion holds the API group and version of the referenced subject. Defaults to \"v1\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io/v1alpha1\" for User and Group subjects.", + "type": "string" + }, + "kind": { + "description": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + "type": "string" + }, + "name": { + "description": "Name of the object being referenced.", + "type": "string" + }, + "namespace": { + "description": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + "type": "string" + } + } + }, + "v1.LabelSelector": { + "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.LabelSelectorRequirement" + } + }, + "matchLabels": { + "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1beta1.Ingress": { + "description": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec is the desired state of the Ingress. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1beta1.IngressSpec" + }, + "status": { + "description": "Status is the current state of the Ingress. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1beta1.IngressStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "Ingress" + } + ] + }, + "v1.NodeAddress": { + "description": "NodeAddress contains information for the node's address.", + "required": [ + "type", + "address" + ], + "properties": { + "address": { + "description": "The node address.", + "type": "string" + }, + "type": { + "description": "Node address type, one of Hostname, ExternalIP or InternalIP.", + "type": "string" + } + } + }, + "extensions.v1beta1.DeploymentStatus": { + "description": "DeploymentStatus is the most recently observed status of the Deployment.", + "properties": { + "availableReplicas": { + "description": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Represents the latest available observations of a deployment's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/extensions.v1beta1.DeploymentCondition" + } + }, + "observedGeneration": { + "description": "The generation observed by the deployment controller.", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "Total number of ready pods targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + "type": "integer", + "format": "int32" + }, + "unavailableReplicas": { + "description": "Total number of unavailable pods targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "updatedReplicas": { + "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + "type": "integer", + "format": "int32" + } + } + }, + "v1.EnvVar": { + "description": "EnvVar represents an environment variable present in a Container.", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Name of the environment variable. Must be a C_IDENTIFIER.", + "type": "string" + }, + "value": { + "description": "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", + "type": "string" + }, + "valueFrom": { + "description": "Source for the environment variable's value. Cannot be used if value is not empty.", + "$ref": "#/definitions/v1.EnvVarSource" + } + } + }, + "v1.AWSElasticBlockStoreVolumeSource": { + "description": "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.", + "required": [ + "volumeID" + ], + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore", + "type": "string" + }, + "partition": { + "description": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).", + "type": "integer", + "format": "int32" + }, + "readOnly": { + "description": "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore", + "type": "boolean" + }, + "volumeID": { + "description": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore", + "type": "string" + } + } + }, + "v1.NFSVolumeSource": { + "description": "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.", + "required": [ + "server", + "path" + ], + "properties": { + "path": { + "description": "Path that is exported by the NFS server. More info: http://kubernetes.io/docs/user-guide/volumes#nfs", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: http://kubernetes.io/docs/user-guide/volumes#nfs", + "type": "boolean" + }, + "server": { + "description": "Server is the hostname or IP address of the NFS server. More info: http://kubernetes.io/docs/user-guide/volumes#nfs", + "type": "string" + } + } + }, + "v1beta1.PodSecurityPolicySpec": { + "description": "Pod Security Policy Spec defines the policy enforced.", + "required": [ + "seLinux", + "runAsUser", + "supplementalGroups", + "fsGroup" + ], + "properties": { + "allowedCapabilities": { + "description": "AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.", + "type": "array", + "items": { + "type": "string" + } + }, + "defaultAddCapabilities": { + "description": "DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities.", + "type": "array", + "items": { + "type": "string" + } + }, + "fsGroup": { + "description": "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.", + "$ref": "#/definitions/v1beta1.FSGroupStrategyOptions" + }, + "hostIPC": { + "description": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", + "type": "boolean" + }, + "hostNetwork": { + "description": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", + "type": "boolean" + }, + "hostPID": { + "description": "hostPID determines if the policy allows the use of HostPID in the pod spec.", + "type": "boolean" + }, + "hostPorts": { + "description": "hostPorts determines which host port ranges are allowed to be exposed.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.HostPortRange" + } + }, + "privileged": { + "description": "privileged determines if a pod can request to be run as privileged.", + "type": "boolean" + }, + "readOnlyRootFilesystem": { + "description": "ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", + "type": "boolean" + }, + "requiredDropCapabilities": { + "description": "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", + "type": "array", + "items": { + "type": "string" + } + }, + "runAsUser": { + "description": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", + "$ref": "#/definitions/v1beta1.RunAsUserStrategyOptions" + }, + "seLinux": { + "description": "seLinux is the strategy that will dictate the allowable labels that may be set.", + "$ref": "#/definitions/v1beta1.SELinuxStrategyOptions" + }, + "supplementalGroups": { + "description": "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", + "$ref": "#/definitions/v1beta1.SupplementalGroupsStrategyOptions" + }, + "volumes": { + "description": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.ListMeta": { + "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "properties": { + "resourceVersion": { + "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.", + "type": "string" + } + } + }, + "v1beta1.ReplicaSetList": { + "description": "ReplicaSetList is a collection of ReplicaSets.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of ReplicaSets. More info: http://kubernetes.io/docs/user-guide/replication-controller", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.ReplicaSet" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "ReplicaSetList" + } + ] + }, + "v1.ServiceAccountList": { + "description": "ServiceAccountList is a list of ServiceAccount objects", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of ServiceAccounts. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md#service-accounts", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ServiceAccount" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "ServiceAccountList" + } + ] + }, + "v1.HorizontalPodAutoscalerList": { + "description": "list of horizontal pod autoscaler objects.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "list of horizontal pod autoscaler objects.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.HorizontalPodAutoscaler" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "autoscaling", + "Version": "v1", + "Kind": "HorizontalPodAutoscalerList" + } + ] + }, + "v1.Probe": { + "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", + "properties": { + "exec": { + "description": "One and only one of the following should be specified. Exec specifies the action to take.", + "$ref": "#/definitions/v1.ExecAction" + }, + "failureThreshold": { + "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "httpGet": { + "description": "HTTPGet specifies the http request to perform.", + "$ref": "#/definitions/v1.HTTPGetAction" + }, + "initialDelaySeconds": { + "description": "Number of seconds after the container has started before liveness probes are initiated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", + "type": "integer", + "format": "int32" + }, + "periodSeconds": { + "description": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "successThreshold": { + "description": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "tcpSocket": { + "description": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", + "$ref": "#/definitions/v1.TCPSocketAction" + }, + "timeoutSeconds": { + "description": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", + "type": "integer", + "format": "int32" + } + } + }, + "v1.SecretKeySelector": { + "description": "SecretKeySelector selects a key of a Secret.", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "The key of the secret to select from. Must be a valid secret key.", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret or it's key must be defined", + "type": "boolean" + } + } + }, + "v1.NamespaceSpec": { + "description": "NamespaceSpec describes the attributes on a Namespace.", + "properties": { + "finalizers": { + "description": "Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: http://releases.k8s.io/HEAD/docs/design/namespaces.md#finalizers", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1beta1.ClusterRoleBindingList": { + "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of ClusterRoleBindings", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.ClusterRoleBinding" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1beta1", + "Kind": "ClusterRoleBindingList" + } + ] + }, + "v1.Volume": { + "description": "Volume represents a named volume in a pod that may be accessed by any container in the pod.", + "required": [ + "name" + ], + "properties": { + "awsElasticBlockStore": { + "description": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore", + "$ref": "#/definitions/v1.AWSElasticBlockStoreVolumeSource" + }, + "azureDisk": { + "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "$ref": "#/definitions/v1.AzureDiskVolumeSource" + }, + "azureFile": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "$ref": "#/definitions/v1.AzureFileVolumeSource" + }, + "cephfs": { + "description": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "$ref": "#/definitions/v1.CephFSVolumeSource" + }, + "cinder": { + "description": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "$ref": "#/definitions/v1.CinderVolumeSource" + }, + "configMap": { + "description": "ConfigMap represents a configMap that should populate this volume", + "$ref": "#/definitions/v1.ConfigMapVolumeSource" + }, + "downwardAPI": { + "description": "DownwardAPI represents downward API about the pod that should populate this volume", + "$ref": "#/definitions/v1.DownwardAPIVolumeSource" + }, + "emptyDir": { + "description": "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", + "$ref": "#/definitions/v1.EmptyDirVolumeSource" + }, + "fc": { + "description": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + "$ref": "#/definitions/v1.FCVolumeSource" + }, + "flexVolume": { + "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.", + "$ref": "#/definitions/v1.FlexVolumeSource" + }, + "flocker": { + "description": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", + "$ref": "#/definitions/v1.FlockerVolumeSource" + }, + "gcePersistentDisk": { + "description": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk", + "$ref": "#/definitions/v1.GCEPersistentDiskVolumeSource" + }, + "gitRepo": { + "description": "GitRepo represents a git repository at a particular revision.", + "$ref": "#/definitions/v1.GitRepoVolumeSource" + }, + "glusterfs": { + "description": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", + "$ref": "#/definitions/v1.GlusterfsVolumeSource" + }, + "hostPath": { + "description": "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: http://kubernetes.io/docs/user-guide/volumes#hostpath", + "$ref": "#/definitions/v1.HostPathVolumeSource" + }, + "iscsi": { + "description": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md", + "$ref": "#/definitions/v1.ISCSIVolumeSource" + }, + "name": { + "description": "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "nfs": { + "description": "NFS represents an NFS mount on the host that shares a pod's lifetime More info: http://kubernetes.io/docs/user-guide/volumes#nfs", + "$ref": "#/definitions/v1.NFSVolumeSource" + }, + "persistentVolumeClaim": { + "description": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims", + "$ref": "#/definitions/v1.PersistentVolumeClaimVolumeSource" + }, + "photonPersistentDisk": { + "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "$ref": "#/definitions/v1.PhotonPersistentDiskVolumeSource" + }, + "portworxVolume": { + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "$ref": "#/definitions/v1.PortworxVolumeSource" + }, + "projected": { + "description": "Items for all in one resources secrets, configmaps, and downward API", + "$ref": "#/definitions/v1.ProjectedVolumeSource" + }, + "quobyte": { + "description": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "$ref": "#/definitions/v1.QuobyteVolumeSource" + }, + "rbd": { + "description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", + "$ref": "#/definitions/v1.RBDVolumeSource" + }, + "scaleIO": { + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "$ref": "#/definitions/v1.ScaleIOVolumeSource" + }, + "secret": { + "description": "Secret represents a secret that should populate this volume. More info: http://kubernetes.io/docs/user-guide/volumes#secrets", + "$ref": "#/definitions/v1.SecretVolumeSource" + }, + "vsphereVolume": { + "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "$ref": "#/definitions/v1.VsphereVirtualDiskVolumeSource" + } + } + }, + "v1.ConfigMapKeySelector": { + "description": "Selects a key from a ConfigMap.", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "The key to select.", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or it's key must be defined", + "type": "boolean" + } + } + }, + "v1beta1.IngressList": { + "description": "IngressList is a collection of Ingress.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of Ingress.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.Ingress" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "IngressList" + } + ] + }, + "v1beta1.ReplicaSet": { + "description": "ReplicaSet represents the configuration of a ReplicaSet.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1beta1.ReplicaSetSpec" + }, + "status": { + "description": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1beta1.ReplicaSetStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "ReplicaSet" + } + ] + }, + "v2alpha1.CronJob": { + "description": "CronJob represents the configuration of a single cron job.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec is a structure defining the expected behavior of a job, including the schedule. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v2alpha1.CronJobSpec" + }, + "status": { + "description": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v2alpha1.CronJobStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "batch", + "Version": "v2alpha1", + "Kind": "CronJob" + }, + { + "Group": "batch", + "Version": "v2alpha1", + "Kind": "ScheduledJob" + } + ] + }, + "v1.VsphereVirtualDiskVolumeSource": { + "description": "Represents a vSphere volume resource.", + "required": [ + "volumePath" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "volumePath": { + "description": "Path that identifies vSphere volume vmdk", + "type": "string" + } + } + }, + "v1.Status": { + "description": "Status is a return value for calls that don't return other objects.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "code": { + "description": "Suggested HTTP return code for this status, 0 if not set.", + "type": "integer", + "format": "int32" + }, + "details": { + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", + "$ref": "#/definitions/v1.StatusDetails" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "message": { + "description": "A human-readable description of the status of this operation.", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + }, + "reason": { + "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", + "type": "string" + }, + "status": { + "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "type": "string" + } + } + }, + "v1.ReplicationControllerStatus": { + "description": "ReplicationControllerStatus represents the current status of a replication controller.", + "required": [ + "replicas" + ], + "properties": { + "availableReplicas": { + "description": "The number of available replicas (ready for at least minReadySeconds) for this replication controller.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Represents the latest available observations of a replication controller's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ReplicationControllerCondition" + } + }, + "fullyLabeledReplicas": { + "description": "The number of pods that have labels matching the labels of the pod template of the replication controller.", + "type": "integer", + "format": "int32" + }, + "observedGeneration": { + "description": "ObservedGeneration reflects the generation of the most recently observed replication controller.", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "The number of ready replicas for this replication controller.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Replicas is the most recently oberved number of replicas. More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller", + "type": "integer", + "format": "int32" + } + } + }, + "v1.LoadBalancerStatus": { + "description": "LoadBalancerStatus represents the status of a load-balancer.", + "properties": { + "ingress": { + "description": "Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.LoadBalancerIngress" + } + } + } + }, + "v1.Binding": { + "description": "Binding ties one object to another. For example, a pod is bound to a node by a scheduler.", + "required": [ + "target" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "target": { + "description": "The target object that you want to bind to the standard object.", + "$ref": "#/definitions/v1.ObjectReference" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "Binding" + } + ] + }, + "v1.VolumeProjection": { + "description": "Projection that may be projected along with other supported volume types", + "properties": { + "configMap": { + "description": "information about the configMap data to project", + "$ref": "#/definitions/v1.ConfigMapProjection" + }, + "downwardAPI": { + "description": "information about the downwardAPI data to project", + "$ref": "#/definitions/v1.DownwardAPIProjection" + }, + "secret": { + "description": "information about the secret data to project", + "$ref": "#/definitions/v1.SecretProjection" + } + } + }, + "v1.TokenReviewSpec": { + "description": "TokenReviewSpec is a description of the token authentication request.", + "properties": { + "token": { + "description": "Token is the opaque bearer token.", + "type": "string" + } + } + }, + "v1beta1.Subject": { + "description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", + "required": [ + "kind", + "name" + ], + "properties": { + "apiGroup": { + "description": "APIGroup holds the API group of the referenced subject. Defaults to \"\" for ServiceAccount subjects. Defaults to \"rbac.authorization.k8s.io\" for User and Group subjects.", + "type": "string" + }, + "kind": { + "description": "Kind of object being referenced. Values defined by this API group are \"User\", \"Group\", and \"ServiceAccount\". If the Authorizer does not recognized the kind value, the Authorizer should report an error.", + "type": "string" + }, + "name": { + "description": "Name of the object being referenced.", + "type": "string" + }, + "namespace": { + "description": "Namespace of the referenced object. If the object kind is non-namespace, such as \"User\" or \"Group\", and this value is not empty the Authorizer should report an error.", + "type": "string" + } + } + }, + "v1.NodeList": { + "description": "NodeList is the whole list of all Nodes which have been registered with master.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of nodes", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Node" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "NodeList" + } + ] + }, + "v1.ContainerPort": { + "description": "ContainerPort represents a network port in a single container.", + "required": [ + "containerPort" + ], + "properties": { + "containerPort": { + "description": "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.", + "type": "integer", + "format": "int32" + }, + "hostIP": { + "description": "What host IP to bind the external port to.", + "type": "string" + }, + "hostPort": { + "description": "Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.", + "type": "integer", + "format": "int32" + }, + "name": { + "description": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", + "type": "string" + }, + "protocol": { + "description": "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".", + "type": "string" + } + } + }, + "v1.FCVolumeSource": { + "description": "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.", + "required": [ + "targetWWNs", + "lun" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "lun": { + "description": "Required: FC target lun number", + "type": "integer", + "format": "int32" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "targetWWNs": { + "description": "Required: FC target worldwide names (WWNs)", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "runtime.RawExtension": { + "description": "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", + "required": [ + "Raw" + ], + "properties": { + "Raw": { + "description": "Raw is the underlying serialization of this object.", + "type": "string", + "format": "byte" + } + } + }, + "v1alpha1.ClusterRoleBinding": { + "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + "required": [ + "subjects", + "roleRef" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "roleRef": { + "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + "$ref": "#/definitions/v1alpha1.RoleRef" + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1.Subject" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1alpha1", + "Kind": "ClusterRoleBinding" + } + ] + }, + "version.Info": { + "description": "Info contains versioning information. how we'll want to distribute that information.", + "required": [ + "major", + "minor", + "gitVersion", + "gitCommit", + "gitTreeState", + "buildDate", + "goVersion", + "compiler", + "platform" + ], + "properties": { + "buildDate": { + "type": "string" + }, + "compiler": { + "type": "string" + }, + "gitCommit": { + "type": "string" + }, + "gitTreeState": { + "type": "string" + }, + "gitVersion": { + "type": "string" + }, + "goVersion": { + "type": "string" + }, + "major": { + "type": "string" + }, + "minor": { + "type": "string" + }, + "platform": { + "type": "string" + } + } + }, + "v2alpha1.HorizontalPodAutoscaler": { + "description": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "metadata is the standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "spec is the specification for the behaviour of the autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscalerSpec" + }, + "status": { + "description": "status is the current information about the autoscaler.", + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscalerStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "autoscaling", + "Version": "v2alpha1", + "Kind": "HorizontalPodAutoscaler" + } + ] + }, + "v1.ReplicationControllerSpec": { + "description": "ReplicationControllerSpec is the specification of a replication controller.", + "properties": { + "minReadySeconds": { + "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "template": { + "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template", + "$ref": "#/definitions/v1.PodTemplateSpec" + } + } + }, + "v1.TCPSocketAction": { + "description": "TCPSocketAction describes an action based on opening a socket", + "required": [ + "port" + ], + "properties": { + "port": { + "description": "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + "type": "string", + "format": "int-or-string" + } + } + }, + "v1alpha1.RoleList": { + "description": "RoleList is a collection of Roles", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of Roles", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1.Role" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1alpha1", + "Kind": "RoleList" + } + ] + }, + "v1beta1.StatefulSetList": { + "description": "StatefulSetList is a collection of StatefulSets.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.StatefulSet" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "apps", + "Version": "v1beta1", + "Kind": "StatefulSetList" + } + ] + }, + "v1.ISCSIVolumeSource": { + "description": "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", + "required": [ + "targetPortal", + "iqn", + "lun" + ], + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#iscsi", + "type": "string" + }, + "iqn": { + "description": "Target iSCSI Qualified Name.", + "type": "string" + }, + "iscsiInterface": { + "description": "Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.", + "type": "string" + }, + "lun": { + "description": "iSCSI target lun number.", + "type": "integer", + "format": "int32" + }, + "portals": { + "description": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", + "type": "boolean" + }, + "targetPortal": { + "description": "iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + "type": "string" + } + } + }, + "v1.PodTemplate": { + "description": "PodTemplate describes a template for creating copies of a predefined pod.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "template": { + "description": "Template defines the pods that will be created from this pod template. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.PodTemplateSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "PodTemplate" + } + ] + }, + "v1.Toleration": { + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .", + "properties": { + "effect": { + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", + "type": "string" + }, + "key": { + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", + "type": "string" + }, + "operator": { + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", + "type": "string" + }, + "tolerationSeconds": { + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.", + "type": "integer", + "format": "int64" + }, + "value": { + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", + "type": "string" + } + } + }, + "v1beta1.ClusterRoleList": { + "description": "ClusterRoleList is a collection of ClusterRoles", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of ClusterRoles", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.ClusterRole" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1beta1", + "Kind": "ClusterRoleList" + } + ] + }, + "extensions.v1beta1.DeploymentList": { + "description": "DeploymentList is a list of Deployments.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of Deployments.", + "type": "array", + "items": { + "$ref": "#/definitions/extensions.v1beta1.Deployment" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "DeploymentList" + } + ] + }, + "v1.ScaleStatus": { + "description": "ScaleStatus represents the current status of a scale subresource.", + "required": [ + "replicas" + ], + "properties": { + "replicas": { + "description": "actual number of observed instances of the scaled object.", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "type": "string" + } + } + }, + "v1.ServiceStatus": { + "description": "ServiceStatus represents the current status of a service.", + "properties": { + "loadBalancer": { + "description": "LoadBalancer contains the current status of the load-balancer, if one is present.", + "$ref": "#/definitions/v1.LoadBalancerStatus" + } + } + }, + "v1.PodSpec": { + "description": "PodSpec is a description of a pod.", + "required": [ + "containers" + ], + "properties": { + "activeDeadlineSeconds": { + "description": "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", + "type": "integer", + "format": "int64" + }, + "affinity": { + "description": "If specified, the pod's scheduling constraints", + "$ref": "#/definitions/v1.Affinity" + }, + "automountServiceAccountToken": { + "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", + "type": "boolean" + }, + "containers": { + "description": "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Container" + } + }, + "dnsPolicy": { + "description": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + "type": "string" + }, + "hostIPC": { + "description": "Use the host's ipc namespace. Optional: Default to false.", + "type": "boolean" + }, + "hostNetwork": { + "description": "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", + "type": "boolean" + }, + "hostPID": { + "description": "Use the host's pid namespace. Optional: Default to false.", + "type": "boolean" + }, + "hostname": { + "description": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", + "type": "string" + }, + "imagePullSecrets": { + "description": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod", + "type": "array", + "items": { + "$ref": "#/definitions/v1.LocalObjectReference" + } + }, + "initContainers": { + "description": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Container" + } + }, + "nodeName": { + "description": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.", + "type": "string" + }, + "nodeSelector": { + "description": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: http://kubernetes.io/docs/user-guide/node-selection/README", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "restartPolicy": { + "description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: http://kubernetes.io/docs/user-guide/pod-states#restartpolicy", + "type": "string" + }, + "schedulerName": { + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", + "type": "string" + }, + "securityContext": { + "description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", + "$ref": "#/definitions/v1.PodSecurityContext" + }, + "serviceAccount": { + "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", + "type": "string" + }, + "serviceAccountName": { + "description": "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: http://releases.k8s.io/HEAD/docs/design/service_accounts.md", + "type": "string" + }, + "subdomain": { + "description": "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", + "type": "string" + }, + "terminationGracePeriodSeconds": { + "description": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", + "type": "integer", + "format": "int64" + }, + "tolerations": { + "description": "If specified, the pod's tolerations.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Toleration" + } + }, + "volumes": { + "description": "List of volumes that can be mounted by containers belonging to the pod. More info: http://kubernetes.io/docs/user-guide/volumes", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Volume" + } + } + } + }, + "v1.NamespaceList": { + "description": "NamespaceList is a list of Namespaces.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of Namespace objects in the list. More info: http://kubernetes.io/docs/user-guide/namespaces", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Namespace" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "NamespaceList" + } + ] + }, + "v1.NodeSystemInfo": { + "description": "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", + "required": [ + "machineID", + "systemUUID", + "bootID", + "kernelVersion", + "osImage", + "containerRuntimeVersion", + "kubeletVersion", + "kubeProxyVersion", + "operatingSystem", + "architecture" + ], + "properties": { + "architecture": { + "description": "The Architecture reported by the node", + "type": "string" + }, + "bootID": { + "description": "Boot ID reported by the node.", + "type": "string" + }, + "containerRuntimeVersion": { + "description": "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).", + "type": "string" + }, + "kernelVersion": { + "description": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", + "type": "string" + }, + "kubeProxyVersion": { + "description": "KubeProxy Version reported by the node.", + "type": "string" + }, + "kubeletVersion": { + "description": "Kubelet Version reported by the node.", + "type": "string" + }, + "machineID": { + "description": "MachineID reported by the node. For unique machine identification in the cluster this field is prefered. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", + "type": "string" + }, + "operatingSystem": { + "description": "The Operating System reported by the node", + "type": "string" + }, + "osImage": { + "description": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", + "type": "string" + }, + "systemUUID": { + "description": "SystemUUID reported by the node. For unique machine identification MachineID is prefered. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html", + "type": "string" + } + } + }, + "v1.KeyToPath": { + "description": "Maps a string key to a path within a volume.", + "required": [ + "key", + "path" + ], + "properties": { + "key": { + "description": "The key to project.", + "type": "string" + }, + "mode": { + "description": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "path": { + "description": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", + "type": "string" + } + } + }, + "v1beta1.ResourceAttributes": { + "description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", + "properties": { + "group": { + "description": "Group is the API Group of the Resource. \"*\" means all.", + "type": "string" + }, + "name": { + "description": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", + "type": "string" + }, + "namespace": { + "description": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview", + "type": "string" + }, + "resource": { + "description": "Resource is one of the existing resource types. \"*\" means all.", + "type": "string" + }, + "subresource": { + "description": "Subresource is one of the existing resource types. \"\" means none.", + "type": "string" + }, + "verb": { + "description": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + "type": "string" + }, + "version": { + "description": "Version is the API Version of the Resource. \"*\" means all.", + "type": "string" + } + } + }, + "v1.EnvFromSource": { + "description": "EnvFromSource represents the source of a set of ConfigMaps", + "properties": { + "configMapRef": { + "description": "The ConfigMap to select from", + "$ref": "#/definitions/v1.ConfigMapEnvSource" + }, + "prefix": { + "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", + "type": "string" + }, + "secretRef": { + "description": "The Secret to select from", + "$ref": "#/definitions/v1.SecretEnvSource" + } + } + }, + "v1beta1.CertificateSigningRequestList": { + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequest" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "certificates.k8s.io", + "Version": "v1beta1", + "Kind": "CertificateSigningRequestList" + } + ] + }, + "v1.JobStatus": { + "description": "JobStatus represents the current state of a Job.", + "properties": { + "active": { + "description": "Active is the number of actively running pods.", + "type": "integer", + "format": "int32" + }, + "completionTime": { + "description": "CompletionTime represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + "type": "string", + "format": "date-time" + }, + "conditions": { + "description": "Conditions represent the latest available observations of an object's current state. More info: http://kubernetes.io/docs/user-guide/jobs", + "type": "array", + "items": { + "$ref": "#/definitions/v1.JobCondition" + } + }, + "failed": { + "description": "Failed is the number of pods which reached Phase Failed.", + "type": "integer", + "format": "int32" + }, + "startTime": { + "description": "StartTime represents time when the job was acknowledged by the Job Manager. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + "type": "string", + "format": "date-time" + }, + "succeeded": { + "description": "Succeeded is the number of pods which reached Phase Succeeded.", + "type": "integer", + "format": "int32" + } + } + }, + "v1.EventSource": { + "description": "EventSource contains information for an event.", + "properties": { + "component": { + "description": "Component from which the event is generated.", + "type": "string" + }, + "host": { + "description": "Node name on which the event is generated.", + "type": "string" + } + } + }, + "v1beta1.ReplicaSetCondition": { + "description": "ReplicaSetCondition describes the state of a replica set at a certain point.", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "The last time the condition transitioned from one status to another.", + "type": "string", + "format": "date-time" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of replica set condition.", + "type": "string" + } + } + }, + "v1.GCEPersistentDiskVolumeSource": { + "description": "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.", + "required": [ + "pdName" + ], + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk", + "type": "string" + }, + "partition": { + "description": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk", + "type": "integer", + "format": "int32" + }, + "pdName": { + "description": "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk", + "type": "boolean" + } + } + }, + "v1.ServiceAccount": { + "description": "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "automountServiceAccountToken": { + "description": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: http://kubernetes.io/docs/user-guide/secrets#manually-specifying-an-imagepullsecret", + "type": "array", + "items": { + "$ref": "#/definitions/v1.LocalObjectReference" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "secrets": { + "description": "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: http://kubernetes.io/docs/user-guide/secrets", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ObjectReference" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "ServiceAccount" + } + ] + }, + "v1.PersistentVolumeSpec": { + "description": "PersistentVolumeSpec is the specification of a persistent volume.", + "properties": { + "accessModes": { + "description": "AccessModes contains all ways the volume can be mounted. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes", + "type": "array", + "items": { + "type": "string" + } + }, + "awsElasticBlockStore": { + "description": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: http://kubernetes.io/docs/user-guide/volumes#awselasticblockstore", + "$ref": "#/definitions/v1.AWSElasticBlockStoreVolumeSource" + }, + "azureDisk": { + "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "$ref": "#/definitions/v1.AzureDiskVolumeSource" + }, + "azureFile": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "$ref": "#/definitions/v1.AzureFileVolumeSource" + }, + "capacity": { + "description": "A description of the persistent volume's resources and capacity. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#capacity", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "cephfs": { + "description": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "$ref": "#/definitions/v1.CephFSVolumeSource" + }, + "cinder": { + "description": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "$ref": "#/definitions/v1.CinderVolumeSource" + }, + "claimRef": { + "description": "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#binding", + "$ref": "#/definitions/v1.ObjectReference" + }, + "fc": { + "description": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + "$ref": "#/definitions/v1.FCVolumeSource" + }, + "flexVolume": { + "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.", + "$ref": "#/definitions/v1.FlexVolumeSource" + }, + "flocker": { + "description": "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", + "$ref": "#/definitions/v1.FlockerVolumeSource" + }, + "gcePersistentDisk": { + "description": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: http://kubernetes.io/docs/user-guide/volumes#gcepersistentdisk", + "$ref": "#/definitions/v1.GCEPersistentDiskVolumeSource" + }, + "glusterfs": { + "description": "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", + "$ref": "#/definitions/v1.GlusterfsVolumeSource" + }, + "hostPath": { + "description": "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: http://kubernetes.io/docs/user-guide/volumes#hostpath", + "$ref": "#/definitions/v1.HostPathVolumeSource" + }, + "iscsi": { + "description": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", + "$ref": "#/definitions/v1.ISCSIVolumeSource" + }, + "nfs": { + "description": "NFS represents an NFS mount on the host. Provisioned by an admin. More info: http://kubernetes.io/docs/user-guide/volumes#nfs", + "$ref": "#/definitions/v1.NFSVolumeSource" + }, + "persistentVolumeReclaimPolicy": { + "description": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy", + "type": "string" + }, + "photonPersistentDisk": { + "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "$ref": "#/definitions/v1.PhotonPersistentDiskVolumeSource" + }, + "portworxVolume": { + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "$ref": "#/definitions/v1.PortworxVolumeSource" + }, + "quobyte": { + "description": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "$ref": "#/definitions/v1.QuobyteVolumeSource" + }, + "rbd": { + "description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", + "$ref": "#/definitions/v1.RBDVolumeSource" + }, + "scaleIO": { + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "$ref": "#/definitions/v1.ScaleIOVolumeSource" + }, + "storageClassName": { + "description": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", + "type": "string" + }, + "vsphereVolume": { + "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "$ref": "#/definitions/v1.VsphereVirtualDiskVolumeSource" + } + } + }, + "v1beta1.CertificateSigningRequestStatus": { + "properties": { + "certificate": { + "description": "If request was approved, the controller will place the issued certificate here.", + "type": "string", + "format": "byte" + }, + "conditions": { + "description": "Conditions applied to the request, such as approval or denial.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.CertificateSigningRequestCondition" + } + } + } + }, + "v1.Service": { + "description": "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the behavior of a service. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.ServiceSpec" + }, + "status": { + "description": "Most recently observed status of the service. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.ServiceStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "Service" + } + ] + }, + "v1beta1.IngressRule": { + "description": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + "properties": { + "host": { + "description": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the\n\t IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.", + "type": "string" + }, + "http": { + "$ref": "#/definitions/v1beta1.HTTPIngressRuleValue" + } + } + }, + "apps.v1beta1.DeploymentSpec": { + "description": "DeploymentSpec is the specification of the desired behavior of the Deployment.", + "required": [ + "template" + ], + "properties": { + "minReadySeconds": { + "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "type": "integer", + "format": "int32" + }, + "paused": { + "description": "Indicates that the deployment is paused.", + "type": "boolean" + }, + "progressDeadlineSeconds": { + "description": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + "type": "integer", + "format": "int32" + }, + "revisionHistoryLimit": { + "description": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.", + "type": "integer", + "format": "int32" + }, + "rollbackTo": { + "description": "The config this deployment is rolling back to. Will be cleared after rollback is done.", + "$ref": "#/definitions/apps.v1beta1.RollbackConfig" + }, + "selector": { + "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", + "$ref": "#/definitions/v1.LabelSelector" + }, + "strategy": { + "description": "The deployment strategy to use to replace existing pods with new ones.", + "$ref": "#/definitions/apps.v1beta1.DeploymentStrategy" + }, + "template": { + "description": "Template describes the pods that will be created.", + "$ref": "#/definitions/v1.PodTemplateSpec" + } + } + }, + "v1.SubjectAccessReviewStatus": { + "description": "SubjectAccessReviewStatus", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "description": "Allowed is required. True if the action would be allowed, false otherwise.", + "type": "boolean" + }, + "evaluationError": { + "description": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", + "type": "string" + }, + "reason": { + "description": "Reason is optional. It indicates why a request was allowed or denied.", + "type": "string" + } + } + }, + "v2alpha1.CrossVersionObjectReference": { + "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", + "required": [ + "kind", + "name" + ], + "properties": { + "apiVersion": { + "description": "API version of the referent", + "type": "string" + }, + "kind": { + "description": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds\"", + "type": "string" + }, + "name": { + "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + } + } + }, + "v1.PortworxVolumeSource": { + "description": "PortworxVolumeSource represents a Portworx volume resource.", + "required": [ + "volumeID" + ], + "properties": { + "fsType": { + "description": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "volumeID": { + "description": "VolumeID uniquely identifies a Portworx volume", + "type": "string" + } + } + }, + "v1.NodeCondition": { + "description": "NodeCondition contains condition information for a node.", + "required": [ + "type", + "status" + ], + "properties": { + "lastHeartbeatTime": { + "description": "Last time we got an update on a given condition.", + "type": "string", + "format": "date-time" + }, + "lastTransitionTime": { + "description": "Last time the condition transit from one status to another.", + "type": "string", + "format": "date-time" + }, + "message": { + "description": "Human readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "(brief) reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of node condition.", + "type": "string" + } + } + }, + "v1.EndpointSubset": { + "description": "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]", + "properties": { + "addresses": { + "description": "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.EndpointAddress" + } + }, + "notReadyAddresses": { + "description": "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.EndpointAddress" + } + }, + "ports": { + "description": "Port numbers available on the related IP addresses.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.EndpointPort" + } + } + } + }, + "v1.SubjectAccessReviewSpec": { + "description": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "properties": { + "extra": { + "description": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "groups": { + "description": "Groups is the groups you're testing for.", + "type": "array", + "items": { + "type": "string" + } + }, + "nonResourceAttributes": { + "description": "NonResourceAttributes describes information for a non-resource access request", + "$ref": "#/definitions/v1.NonResourceAttributes" + }, + "resourceAttributes": { + "description": "ResourceAuthorizationAttributes describes information for a resource access request", + "$ref": "#/definitions/v1.ResourceAttributes" + }, + "user": { + "description": "User is the user you're testing for. If you specify \"User\" but not \"Groups\", then is it interpreted as \"What if User were not a member of any groups", + "type": "string" + } + } + }, + "apps.v1beta1.ScaleSpec": { + "description": "ScaleSpec describes the attributes of a scale subresource", + "properties": { + "replicas": { + "description": "desired number of instances for the scaled object.", + "type": "integer", + "format": "int32" + } + } + }, + "v1alpha1.RoleRef": { + "description": "RoleRef contains information that points to the role being used", + "required": [ + "apiGroup", + "kind", + "name" + ], + "properties": { + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced", + "type": "string" + }, + "kind": { + "description": "Kind is the type of resource being referenced", + "type": "string" + }, + "name": { + "description": "Name is the name of resource being referenced", + "type": "string" + } + } + }, + "v1beta1.IngressSpec": { + "description": "IngressSpec describes the Ingress the user wishes to exist.", + "properties": { + "backend": { + "description": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", + "$ref": "#/definitions/v1beta1.IngressBackend" + }, + "rules": { + "description": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.IngressRule" + } + }, + "tls": { + "description": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.IngressTLS" + } + } + } + }, + "v1beta1.SubjectAccessReviewSpec": { + "description": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "properties": { + "extra": { + "description": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "group": { + "description": "Groups is the groups you're testing for.", + "type": "array", + "items": { + "type": "string" + } + }, + "nonResourceAttributes": { + "description": "NonResourceAttributes describes information for a non-resource access request", + "$ref": "#/definitions/v1beta1.NonResourceAttributes" + }, + "resourceAttributes": { + "description": "ResourceAuthorizationAttributes describes information for a resource access request", + "$ref": "#/definitions/v1beta1.ResourceAttributes" + }, + "user": { + "description": "User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups", + "type": "string" + } + } + }, + "v1beta1.NetworkPolicyIngressRule": { + "description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", + "properties": { + "from": { + "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.NetworkPolicyPeer" + } + }, + "ports": { + "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.NetworkPolicyPort" + } + } + } + }, + "v1.PersistentVolumeClaim": { + "description": "PersistentVolumeClaim is a user's request for and claim to a persistent volume", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the desired characteristics of a volume requested by a pod author. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims", + "$ref": "#/definitions/v1.PersistentVolumeClaimSpec" + }, + "status": { + "description": "Status represents the current information/status of a persistent volume claim. Read-only. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims", + "$ref": "#/definitions/v1.PersistentVolumeClaimStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "PersistentVolumeClaim" + } + ] + }, + "v1.SecretList": { + "description": "SecretList is a list of Secret.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of secret objects. More info: http://kubernetes.io/docs/user-guide/secrets", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Secret" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "SecretList" + } + ] + }, + "v1.SecretEnvSource": { + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret must be defined", + "type": "boolean" + } + } + }, + "v1.Capabilities": { + "description": "Adds and removes POSIX capabilities from running containers.", + "properties": { + "add": { + "description": "Added capabilities", + "type": "array", + "items": { + "type": "string" + } + }, + "drop": { + "description": "Removed capabilities", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.ResourceQuotaStatus": { + "description": "ResourceQuotaStatus defines the enforced hard limits and observed use.", + "properties": { + "hard": { + "description": "Hard is the set of enforced hard limits for each named resource. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "used": { + "description": "Used is the current observed total usage of the resource in the namespace.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1.OwnerReference": { + "description": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", + "required": [ + "apiVersion", + "kind", + "name", + "uid" + ], + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "blockOwnerDeletion": { + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", + "type": "boolean" + }, + "controller": { + "description": "If true, this reference points to the managing controller.", + "type": "boolean" + }, + "kind": { + "description": "Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "uid": { + "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "v1alpha1.PodPreset": { + "description": "PodPreset is a policy resource that defines additional runtime requirements for a Pod.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1alpha1.PodPresetSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "settings.k8s.io", + "Version": "v1alpha1", + "Kind": "PodPreset" + } + ] + }, + "v1beta1.ReplicaSetSpec": { + "description": "ReplicaSetSpec is the specification of a ReplicaSet.", + "properties": { + "minReadySeconds": { + "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "$ref": "#/definitions/v1.LabelSelector" + }, + "template": { + "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template", + "$ref": "#/definitions/v1.PodTemplateSpec" + } + } + }, + "v1.PhotonPersistentDiskVolumeSource": { + "description": "Represents a Photon Controller persistent disk resource.", + "required": [ + "pdID" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "pdID": { + "description": "ID that identifies Photon Controller persistent disk", + "type": "string" + } + } + }, + "v1.SecretVolumeSource": { + "description": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.", + "properties": { + "defaultMode": { + "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.KeyToPath" + } + }, + "optional": { + "description": "Specify whether the Secret or it's keys must be defined", + "type": "boolean" + }, + "secretName": { + "description": "Name of the secret in the pod's namespace to use. More info: http://kubernetes.io/docs/user-guide/volumes#secrets", + "type": "string" + } + } + }, + "v1.PersistentVolumeClaimSpec": { + "description": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", + "properties": { + "accessModes": { + "description": "AccessModes contains the desired access modes the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1", + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "description": "Resources represents the minimum resources the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources", + "$ref": "#/definitions/v1.ResourceRequirements" + }, + "selector": { + "description": "A label query over volumes to consider for binding.", + "$ref": "#/definitions/v1.LabelSelector" + }, + "storageClassName": { + "description": "Name of the StorageClass required by the claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1", + "type": "string" + }, + "volumeName": { + "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.", + "type": "string" + } + } + }, + "v1.PersistentVolumeClaimList": { + "description": "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "A list of persistent volume claims. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims", + "type": "array", + "items": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "PersistentVolumeClaimList" + } + ] + }, + "v1.ObjectReference": { + "description": "ObjectReference contains enough information to let you inspect or modify the referred object.", + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "fieldPath": { + "description": "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.", + "type": "string" + }, + "kind": { + "description": "Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "namespace": { + "description": "Namespace of the referent. More info: http://kubernetes.io/docs/user-guide/namespaces", + "type": "string" + }, + "resourceVersion": { + "description": "Specific resourceVersion to which this reference is made, if any. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "uid": { + "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "v1.PodCondition": { + "description": "PodCondition contains details for the current condition of this pod.", + "required": [ + "type", + "status" + ], + "properties": { + "lastProbeTime": { + "description": "Last time we probed the condition.", + "type": "string", + "format": "date-time" + }, + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "type": "string", + "format": "date-time" + }, + "message": { + "description": "Human-readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "Unique, one-word, CamelCase reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status is the status of the condition. Can be True, False, Unknown. More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions", + "type": "string" + }, + "type": { + "description": "Type is the type of the condition. Currently only Ready. More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions", + "type": "string" + } + } + }, + "v1beta1.RoleRef": { + "description": "RoleRef contains information that points to the role being used", + "required": [ + "apiGroup", + "kind", + "name" + ], + "properties": { + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced", + "type": "string" + }, + "kind": { + "description": "Kind is the type of resource being referenced", + "type": "string" + }, + "name": { + "description": "Name is the name of resource being referenced", + "type": "string" + } + } + }, + "v2alpha1.MetricStatus": { + "description": "MetricStatus describes the last-read state of a single metric.", + "required": [ + "type" + ], + "properties": { + "object": { + "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", + "$ref": "#/definitions/v2alpha1.ObjectMetricStatus" + }, + "pods": { + "description": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "$ref": "#/definitions/v2alpha1.PodsMetricStatus" + }, + "resource": { + "description": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "$ref": "#/definitions/v2alpha1.ResourceMetricStatus" + }, + "type": { + "description": "type is the type of metric source. It will match one of the fields below.", + "type": "string" + } + } + }, + "v1beta1.IngressStatus": { + "description": "IngressStatus describe the current state of the Ingress.", + "properties": { + "loadBalancer": { + "description": "LoadBalancer contains the current status of the load-balancer.", + "$ref": "#/definitions/v1.LoadBalancerStatus" + } + } + }, + "v1.ConfigMapEnvSource": { + "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap must be defined", + "type": "boolean" + } + } + }, + "v1beta1.CertificateSigningRequestCondition": { + "required": [ + "type" + ], + "properties": { + "lastUpdateTime": { + "description": "timestamp for the last update to this condition", + "type": "string", + "format": "date-time" + }, + "message": { + "description": "human readable message with details about the request state", + "type": "string" + }, + "reason": { + "description": "brief reason for the request state", + "type": "string" + }, + "type": { + "description": "request approval state, currently Approved or Denied.", + "type": "string" + } + } + }, + "v1.ContainerState": { + "description": "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.", + "properties": { + "running": { + "description": "Details about a running container", + "$ref": "#/definitions/v1.ContainerStateRunning" + }, + "terminated": { + "description": "Details about a terminated container", + "$ref": "#/definitions/v1.ContainerStateTerminated" + }, + "waiting": { + "description": "Details about a waiting container", + "$ref": "#/definitions/v1.ContainerStateWaiting" + } + } + }, + "v1beta1.TokenReview": { + "description": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated", + "$ref": "#/definitions/v1beta1.TokenReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request can be authenticated.", + "$ref": "#/definitions/v1beta1.TokenReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "authentication.k8s.io", + "Version": "v1beta1", + "Kind": "TokenReview" + } + ] + }, + "v1.GroupVersionForDiscovery": { + "description": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", + "required": [ + "groupVersion", + "version" + ], + "properties": { + "groupVersion": { + "description": "groupVersion specifies the API group and version in the form \"group/version\"", + "type": "string" + }, + "version": { + "description": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", + "type": "string" + } + } + }, + "v1.ResourceQuotaSpec": { + "description": "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.", + "properties": { + "hard": { + "description": "Hard is the set of desired hard limits for each named resource. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "scopes": { + "description": "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1beta1.PodSecurityPolicyList": { + "description": "Pod Security Policy List is a list of PodSecurityPolicy objects.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of schema objects.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.PodSecurityPolicy" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "PodSecurityPolicyList" + } + ] + }, + "v1beta1.ClusterRoleBinding": { + "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", + "required": [ + "subjects", + "roleRef" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "roleRef": { + "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + "$ref": "#/definitions/v1beta1.RoleRef" + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.Subject" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1beta1", + "Kind": "ClusterRoleBinding" + } + ] + }, + "v1alpha1.RoleBindingList": { + "description": "RoleBindingList is a collection of RoleBindings", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of RoleBindings", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1.RoleBinding" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1alpha1", + "Kind": "RoleBindingList" + } + ] + }, + "v1.EmptyDirVolumeSource": { + "description": "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.", + "properties": { + "medium": { + "description": "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", + "type": "string" + } + } + }, + "v1.LocalSubjectAccessReview": { + "description": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", + "$ref": "#/definitions/v1.SubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/v1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "authorization.k8s.io", + "Version": "v1", + "Kind": "LocalSubjectAccessReview" + } + ] + }, + "v1alpha1.PodPresetList": { + "description": "PodPresetList is a list of PodPreset objects.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of schema objects.", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1.PodPreset" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "settings.k8s.io", + "Version": "v1alpha1", + "Kind": "PodPresetList" + } + ] + }, + "v1alpha1.ClusterRoleList": { + "description": "ClusterRoleList is a collection of ClusterRoles", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of ClusterRoles", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1.ClusterRole" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1alpha1", + "Kind": "ClusterRoleList" + } + ] + }, + "v1beta1.StatefulSetStatus": { + "description": "StatefulSetStatus represents the current state of a StatefulSet.", + "required": [ + "replicas" + ], + "properties": { + "observedGeneration": { + "description": "most recent generation observed by this StatefulSet.", + "type": "integer", + "format": "int64" + }, + "replicas": { + "description": "Replicas is the number of actual replicas.", + "type": "integer", + "format": "int32" + } + } + }, + "v1beta1.RoleBindingList": { + "description": "RoleBindingList is a collection of RoleBindings", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of RoleBindings", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.RoleBinding" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1beta1", + "Kind": "RoleBindingList" + } + ] + }, + "v1.LimitRangeList": { + "description": "LimitRangeList is a list of LimitRange items.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of LimitRange objects. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_limit_range.md", + "type": "array", + "items": { + "$ref": "#/definitions/v1.LimitRange" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "LimitRangeList" + } + ] + }, + "v1.AzureFileVolumeSource": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "required": [ + "secretName", + "shareName" + ], + "properties": { + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretName": { + "description": "the name of secret that contains Azure Storage Account Name and Key", + "type": "string" + }, + "shareName": { + "description": "Share Name", + "type": "string" + } + } + }, + "v1.DownwardAPIVolumeSource": { + "description": "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.", + "properties": { + "defaultMode": { + "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "items": { + "description": "Items is a list of downward API volume file", + "type": "array", + "items": { + "$ref": "#/definitions/v1.DownwardAPIVolumeFile" + } + } + } + }, + "extensions.v1beta1.ScaleStatus": { + "description": "represents the current status of a scale subresource.", + "required": [ + "replicas" + ], + "properties": { + "replicas": { + "description": "actual number of observed instances of the scaled object.", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "targetSelector": { + "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "type": "string" + } + } + }, + "v1.ObjectMeta": { + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "clusterName": { + "description": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", + "type": "string" + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "type": "string", + "format": "date-time" + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + "type": "integer", + "format": "int64" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "type": "string", + "format": "date-time" + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + "type": "array", + "items": { + "type": "string" + } + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + "type": "integer", + "format": "int64" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.OwnerReference" + } + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.", + "type": "string" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "v1.StorageClassList": { + "description": "StorageClassList is a collection of storage classes.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of StorageClasses", + "type": "array", + "items": { + "$ref": "#/definitions/v1.StorageClass" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "storage.k8s.io", + "Version": "v1", + "Kind": "StorageClassList" + } + ] + }, + "v1.Handler": { + "description": "Handler defines a specific action that should be taken", + "properties": { + "exec": { + "description": "One and only one of the following should be specified. Exec specifies the action to take.", + "$ref": "#/definitions/v1.ExecAction" + }, + "httpGet": { + "description": "HTTPGet specifies the http request to perform.", + "$ref": "#/definitions/v1.HTTPGetAction" + }, + "tcpSocket": { + "description": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", + "$ref": "#/definitions/v1.TCPSocketAction" + } + } + }, + "v1.Namespace": { + "description": "Namespace provides a scope for Names. Use of multiple namespaces is optional.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the behavior of the Namespace. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.NamespaceSpec" + }, + "status": { + "description": "Status describes the current status of a Namespace. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.NamespaceStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "Namespace" + } + ] + }, + "v1.Event": { + "description": "Event is a report of an event somewhere in the cluster.", + "required": [ + "metadata", + "involvedObject" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "count": { + "description": "The number of times this event has occurred.", + "type": "integer", + "format": "int32" + }, + "firstTimestamp": { + "description": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", + "type": "string", + "format": "date-time" + }, + "involvedObject": { + "description": "The object that this event is about.", + "$ref": "#/definitions/v1.ObjectReference" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "lastTimestamp": { + "description": "The time at which the most recent occurrence of this event was recorded.", + "type": "string", + "format": "date-time" + }, + "message": { + "description": "A human-readable description of the status of this operation.", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "reason": { + "description": "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", + "type": "string" + }, + "source": { + "description": "The component reporting this event. Should be a short machine understandable string.", + "$ref": "#/definitions/v1.EventSource" + }, + "type": { + "description": "Type of this event (Normal, Warning), new types could be added in the future", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "Event" + } + ] + }, + "apps.v1beta1.ScaleStatus": { + "description": "ScaleStatus represents the current status of a scale subresource.", + "required": [ + "replicas" + ], + "properties": { + "replicas": { + "description": "actual number of observed instances of the scaled object.", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "targetSelector": { + "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "type": "string" + } + } + }, + "v1.ResourceFieldSelector": { + "description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format", + "required": [ + "resource" + ], + "properties": { + "containerName": { + "description": "Container name: required for volumes, optional for env vars", + "type": "string" + }, + "divisor": { + "description": "Specifies the output format of the exposed resources, defaults to \"1\"", + "type": "string" + }, + "resource": { + "description": "Required: resource to select", + "type": "string" + } + } + }, + "v1.StorageClass": { + "description": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", + "required": [ + "provisioner" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "parameters": { + "description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "provisioner": { + "description": "Provisioner indicates the type of the provisioner.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "storage.k8s.io", + "Version": "v1", + "Kind": "StorageClass" + } + ] + }, + "v1.SelfSubjectAccessReviewSpec": { + "description": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "properties": { + "nonResourceAttributes": { + "description": "NonResourceAttributes describes information for a non-resource access request", + "$ref": "#/definitions/v1.NonResourceAttributes" + }, + "resourceAttributes": { + "description": "ResourceAuthorizationAttributes describes information for a resource access request", + "$ref": "#/definitions/v1.ResourceAttributes" + } + } + }, + "v1.AttachedVolume": { + "description": "AttachedVolume describes a volume attached to a node", + "required": [ + "name", + "devicePath" + ], + "properties": { + "devicePath": { + "description": "DevicePath represents the device path where the volume should be available", + "type": "string" + }, + "name": { + "description": "Name of the attached volume", + "type": "string" + } + } + }, + "v1beta1.StatefulSetSpec": { + "description": "A StatefulSetSpec is the specification of a StatefulSet.", + "required": [ + "template", + "serviceName" + ], + "properties": { + "replicas": { + "description": "Replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "$ref": "#/definitions/v1.LabelSelector" + }, + "serviceName": { + "description": "ServiceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", + "type": "string" + }, + "template": { + "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + "$ref": "#/definitions/v1.PodTemplateSpec" + }, + "volumeClaimTemplates": { + "description": "VolumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.PersistentVolumeClaim" + } + } + } + }, + "apps.v1beta1.Deployment": { + "description": "Deployment enables declarative updates for Pods and ReplicaSets.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the Deployment.", + "$ref": "#/definitions/apps.v1beta1.DeploymentSpec" + }, + "status": { + "description": "Most recently observed status of the Deployment.", + "$ref": "#/definitions/apps.v1beta1.DeploymentStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "apps", + "Version": "v1beta1", + "Kind": "Deployment" + } + ] + }, + "v1.StatusDetails": { + "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + "properties": { + "causes": { + "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.StatusCause" + } + }, + "group": { + "description": "The group attribute of the resource associated with the status StatusReason.", + "type": "string" + }, + "kind": { + "description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", + "type": "string" + }, + "retryAfterSeconds": { + "description": "If specified, the time in seconds before the operation should be retried.", + "type": "integer", + "format": "int32" + } + } + }, + "v1.ResourceQuotaList": { + "description": "ResourceQuotaList is a list of ResourceQuota items.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of ResourceQuota objects. More info: http://releases.k8s.io/HEAD/docs/design/admission_control_resource_quota.md#admissioncontrol-plugin-resourcequota", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ResourceQuota" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "ResourceQuotaList" + } + ] + }, + "v1.LimitRangeSpec": { + "description": "LimitRangeSpec defines a min/max usage limit for resources that match on kind.", + "required": [ + "limits" + ], + "properties": { + "limits": { + "description": "Limits is the list of LimitRangeItem objects that are enforced.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.LimitRangeItem" + } + } + } + }, + "v1.FlexVolumeSource": { + "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.", + "required": [ + "driver" + ], + "properties": { + "driver": { + "description": "Driver is the name of the driver to use for this volume.", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + "type": "string" + }, + "options": { + "description": "Optional: Extra command options if any.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", + "$ref": "#/definitions/v1.LocalObjectReference" + } + } + }, + "v1.PodAffinity": { + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.WeightedPodAffinityTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.PodAffinityTerm" + } + } + } + }, + "v1beta1.SELinuxStrategyOptions": { + "description": "SELinux Strategy Options defines the strategy type and any options used to create the strategy.", + "required": [ + "rule" + ], + "properties": { + "rule": { + "description": "type is the strategy that will dictate the allowable labels that may be set.", + "type": "string" + }, + "seLinuxOptions": { + "description": "seLinuxOptions required to run as; required for MustRunAs More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context", + "$ref": "#/definitions/v1.SELinuxOptions" + } + } + }, + "v1.TokenReviewStatus": { + "description": "TokenReviewStatus is the result of the token authentication request.", + "properties": { + "authenticated": { + "description": "Authenticated indicates that the token was associated with a known user.", + "type": "boolean" + }, + "error": { + "description": "Error indicates that the token couldn't be checked", + "type": "string" + }, + "user": { + "description": "User is the UserInfo associated with the provided token.", + "$ref": "#/definitions/v1.UserInfo" + } + } + }, + "v1beta1.RoleBinding": { + "description": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + "required": [ + "subjects", + "roleRef" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "roleRef": { + "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + "$ref": "#/definitions/v1beta1.RoleRef" + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.Subject" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1beta1", + "Kind": "RoleBinding" + } + ] + }, + "v1.ServicePort": { + "description": "ServicePort contains information on service's port.", + "required": [ + "port" + ], + "properties": { + "name": { + "description": "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service.", + "type": "string" + }, + "nodePort": { + "description": "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: http://kubernetes.io/docs/user-guide/services#type--nodeport", + "type": "integer", + "format": "int32" + }, + "port": { + "description": "The port that will be exposed by this service.", + "type": "integer", + "format": "int32" + }, + "protocol": { + "description": "The IP protocol for this port. Supports \"TCP\" and \"UDP\". Default is TCP.", + "type": "string" + }, + "targetPort": { + "description": "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: http://kubernetes.io/docs/user-guide/services#defining-a-service", + "type": "string", + "format": "int-or-string" + } + } + }, + "v1.ProjectedVolumeSource": { + "description": "Represents a projected volume source", + "required": [ + "sources" + ], + "properties": { + "defaultMode": { + "description": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "sources": { + "description": "list of volume projections", + "type": "array", + "items": { + "$ref": "#/definitions/v1.VolumeProjection" + } + } + } + }, + "v1alpha1.Role": { + "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", + "required": [ + "rules" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "rules": { + "description": "Rules holds all the PolicyRules for this Role", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1.PolicyRule" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1alpha1", + "Kind": "Role" + } + ] + }, + "v1.Preconditions": { + "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "properties": { + "uid": { + "description": "Specifies the target UID.", + "type": "string" + } + } + }, + "v1.Scale": { + "description": "Scale represents a scaling request for a resource.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", + "$ref": "#/definitions/v1.ScaleSpec" + }, + "status": { + "description": "current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.", + "$ref": "#/definitions/v1.ScaleStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "autoscaling", + "Version": "v1", + "Kind": "Scale" + } + ] + }, + "v2alpha1.HorizontalPodAutoscalerSpec": { + "description": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.", + "required": [ + "scaleTargetRef", + "maxReplicas" + ], + "properties": { + "maxReplicas": { + "description": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", + "type": "integer", + "format": "int32" + }, + "metrics": { + "description": "metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond.", + "type": "array", + "items": { + "$ref": "#/definitions/v2alpha1.MetricSpec" + } + }, + "minReplicas": { + "description": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod.", + "type": "integer", + "format": "int32" + }, + "scaleTargetRef": { + "description": "scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.", + "$ref": "#/definitions/v2alpha1.CrossVersionObjectReference" + } + } + }, + "apps.v1beta1.DeploymentRollback": { + "description": "DeploymentRollback stores the information required to rollback a deployment.", + "required": [ + "name", + "rollbackTo" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Required: This must match the Name of a deployment.", + "type": "string" + }, + "rollbackTo": { + "description": "The config of this deployment rollback.", + "$ref": "#/definitions/apps.v1beta1.RollbackConfig" + }, + "updatedAnnotations": { + "description": "The annotations to be updated to a deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "apps", + "Version": "v1beta1", + "Kind": "DeploymentRollback" + } + ] + }, + "v2alpha1.JobTemplateSpec": { + "description": "JobTemplateSpec describes the data a Job should have when created from a template", + "properties": { + "metadata": { + "description": "Standard object's metadata of the jobs created from this template. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.JobSpec" + } + } + }, + "v1.Secret": { + "description": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "data": { + "description": "Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", + "type": "object", + "additionalProperties": { + "type": "string", + "format": "byte" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "stringData": { + "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "type": { + "description": "Used to facilitate programmatic handling of secret data.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "Secret" + } + ] + }, + "extensions.v1beta1.DeploymentRollback": { + "description": "DeploymentRollback stores the information required to rollback a deployment.", + "required": [ + "name", + "rollbackTo" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Required: This must match the Name of a deployment.", + "type": "string" + }, + "rollbackTo": { + "description": "The config of this deployment rollback.", + "$ref": "#/definitions/extensions.v1beta1.RollbackConfig" + }, + "updatedAnnotations": { + "description": "The annotations to be updated to a deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "DeploymentRollback" + } + ] + }, + "v1beta1.SelfSubjectAccessReviewSpec": { + "description": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "properties": { + "nonResourceAttributes": { + "description": "NonResourceAttributes describes information for a non-resource access request", + "$ref": "#/definitions/v1beta1.NonResourceAttributes" + }, + "resourceAttributes": { + "description": "ResourceAuthorizationAttributes describes information for a resource access request", + "$ref": "#/definitions/v1beta1.ResourceAttributes" + } + } + }, + "v1beta1.DaemonSetStatus": { + "description": "DaemonSetStatus represents the current status of a daemon set.", + "required": [ + "currentNumberScheduled", + "numberMisscheduled", + "desiredNumberScheduled", + "numberReady" + ], + "properties": { + "currentNumberScheduled": { + "description": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md", + "type": "integer", + "format": "int32" + }, + "desiredNumberScheduled": { + "description": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md", + "type": "integer", + "format": "int32" + }, + "numberAvailable": { + "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", + "type": "integer", + "format": "int32" + }, + "numberMisscheduled": { + "description": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md", + "type": "integer", + "format": "int32" + }, + "numberReady": { + "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", + "type": "integer", + "format": "int32" + }, + "numberUnavailable": { + "description": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", + "type": "integer", + "format": "int32" + }, + "observedGeneration": { + "description": "The most recent generation observed by the daemon set controller.", + "type": "integer", + "format": "int64" + }, + "updatedNumberScheduled": { + "description": "The total number of nodes that are running updated daemon pod", + "type": "integer", + "format": "int32" + } + } + }, + "v2alpha1.CronJobList": { + "description": "CronJobList is a collection of cron jobs.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of CronJob.", + "type": "array", + "items": { + "$ref": "#/definitions/v2alpha1.CronJob" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "batch", + "Version": "v2alpha1", + "Kind": "CronJobList" + }, + { + "Group": "batch", + "Version": "v2alpha1", + "Kind": "ScheduledJobList" + } + ] + }, + "v1.JobList": { + "description": "JobList is a collection of jobs.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of Job.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Job" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "batch", + "Version": "v1", + "Kind": "JobList" + } + ] + }, + "extensions.v1beta1.Scale": { + "description": "represents a scaling request for a resource.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", + "$ref": "#/definitions/extensions.v1beta1.ScaleSpec" + }, + "status": { + "description": "current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.", + "$ref": "#/definitions/extensions.v1beta1.ScaleStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "Scale" + } + ] + }, + "v1.Taint": { + "description": "The node this Taint is attached to has the effect \"effect\" on any pod that that does not tolerate the Taint.", + "required": [ + "key", + "effect" + ], + "properties": { + "effect": { + "description": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.", + "type": "string" + }, + "key": { + "description": "Required. The taint key to be applied to a node.", + "type": "string" + }, + "timeAdded": { + "description": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", + "type": "string", + "format": "date-time" + }, + "value": { + "description": "Required. The taint value corresponding to the taint key.", + "type": "string" + } + } + }, + "v1beta1.Eviction": { + "description": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "deleteOptions": { + "description": "DeleteOptions may be provided", + "$ref": "#/definitions/v1.DeleteOptions" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "ObjectMeta describes the pod that is being evicted.", + "$ref": "#/definitions/v1.ObjectMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "policy", + "Version": "v1beta1", + "Kind": "Eviction" + } + ] + }, + "v1.NodeDaemonEndpoints": { + "description": "NodeDaemonEndpoints lists ports opened by daemons running on the Node.", + "properties": { + "kubeletEndpoint": { + "description": "Endpoint on which Kubelet is listening.", + "$ref": "#/definitions/v1.DaemonEndpoint" + } + } + }, + "v1.ObjectFieldSelector": { + "description": "ObjectFieldSelector selects an APIVersioned field of an object.", + "required": [ + "fieldPath" + ], + "properties": { + "apiVersion": { + "description": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".", + "type": "string" + }, + "fieldPath": { + "description": "Path of the field to select in the specified API version.", + "type": "string" + } + } + }, + "v1.SecurityContext": { + "description": "SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.", + "properties": { + "capabilities": { + "description": "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.", + "$ref": "#/definitions/v1.Capabilities" + }, + "privileged": { + "description": "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.", + "type": "boolean" + }, + "readOnlyRootFilesystem": { + "description": "Whether this container has a read-only root filesystem. Default is false.", + "type": "boolean" + }, + "runAsNonRoot": { + "description": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "type": "boolean" + }, + "runAsUser": { + "description": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "type": "integer", + "format": "int64" + }, + "seLinuxOptions": { + "description": "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "$ref": "#/definitions/v1.SELinuxOptions" + } + } + }, + "v1.ConfigMap": { + "description": "ConfigMap holds configuration data for pods to consume.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "data": { + "description": "Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "ConfigMap" + } + ] + }, + "v1beta1.IDRange": { + "description": "ID Range provides a min/max of an allowed range of IDs.", + "required": [ + "min", + "max" + ], + "properties": { + "max": { + "description": "Max is the end of the range, inclusive.", + "type": "integer", + "format": "int64" + }, + "min": { + "description": "Min is the start of the range, inclusive.", + "type": "integer", + "format": "int64" + } + } + }, + "v1beta1.CertificateSigningRequestSpec": { + "description": "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", + "required": [ + "request" + ], + "properties": { + "extra": { + "description": "Extra information about the requesting user. See user.Info interface for details.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "groups": { + "description": "Group information about the requesting user. See user.Info interface for details.", + "type": "array", + "items": { + "type": "string" + } + }, + "request": { + "description": "Base64-encoded PKCS#10 CSR data", + "type": "string", + "format": "byte" + }, + "uid": { + "description": "UID information about the requesting user. See user.Info interface for details.", + "type": "string" + }, + "usages": { + "description": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", + "type": "array", + "items": { + "type": "string" + } + }, + "username": { + "description": "Information about the requesting user. See user.Info interface for details.", + "type": "string" + } + } + }, + "v1.TokenReview": { + "description": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated", + "$ref": "#/definitions/v1.TokenReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request can be authenticated.", + "$ref": "#/definitions/v1.TokenReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "authentication.k8s.io", + "Version": "v1", + "Kind": "TokenReview" + } + ] + }, + "v1beta1.TokenReviewSpec": { + "description": "TokenReviewSpec is a description of the token authentication request.", + "properties": { + "token": { + "description": "Token is the opaque bearer token.", + "type": "string" + } + } + }, + "v1.SecretProjection": { + "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + "properties": { + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret or its key must be defined", + "type": "boolean" + } + } + }, + "v1beta1.SelfSubjectAccessReview": { + "description": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated. user and groups must be empty", + "$ref": "#/definitions/v1beta1.SelfSubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/v1beta1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "authorization.k8s.io", + "Version": "v1beta1", + "Kind": "SelfSubjectAccessReview" + } + ] + }, + "v1beta1.DaemonSetSpec": { + "description": "DaemonSetSpec is the specification of a daemon set.", + "required": [ + "template" + ], + "properties": { + "minReadySeconds": { + "description": "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "$ref": "#/definitions/v1.LabelSelector" + }, + "template": { + "description": "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template", + "$ref": "#/definitions/v1.PodTemplateSpec" + }, + "templateGeneration": { + "description": "A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.", + "type": "integer", + "format": "int64" + }, + "updateStrategy": { + "description": "An update strategy to replace existing DaemonSet pods with new pods.", + "$ref": "#/definitions/v1beta1.DaemonSetUpdateStrategy" + } + } + }, + "v2alpha1.CronJobSpec": { + "description": "CronJobSpec describes how the job execution will look like and when it will actually run.", + "required": [ + "schedule", + "jobTemplate" + ], + "properties": { + "concurrencyPolicy": { + "description": "ConcurrencyPolicy specifies how to treat concurrent executions of a Job.", + "type": "string" + }, + "failedJobsHistoryLimit": { + "description": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", + "type": "integer", + "format": "int32" + }, + "jobTemplate": { + "description": "JobTemplate is the object that describes the job that will be created when executing a CronJob.", + "$ref": "#/definitions/v2alpha1.JobTemplateSpec" + }, + "schedule": { + "description": "Schedule contains the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", + "type": "string" + }, + "startingDeadlineSeconds": { + "description": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", + "type": "integer", + "format": "int64" + }, + "successfulJobsHistoryLimit": { + "description": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", + "type": "integer", + "format": "int32" + }, + "suspend": { + "description": "Suspend flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", + "type": "boolean" + } + } + }, + "v1.PersistentVolumeClaimStatus": { + "description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", + "properties": { + "accessModes": { + "description": "AccessModes contains the actual access modes the volume backing the PVC has. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1", + "type": "array", + "items": { + "type": "string" + } + }, + "capacity": { + "description": "Represents the actual resources of the underlying volume.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "phase": { + "description": "Phase represents the current phase of PersistentVolumeClaim.", + "type": "string" + } + } + }, + "v1beta1.TokenReviewStatus": { + "description": "TokenReviewStatus is the result of the token authentication request.", + "properties": { + "authenticated": { + "description": "Authenticated indicates that the token was associated with a known user.", + "type": "boolean" + }, + "error": { + "description": "Error indicates that the token couldn't be checked", + "type": "string" + }, + "user": { + "description": "User is the UserInfo associated with the provided token.", + "$ref": "#/definitions/v1beta1.UserInfo" + } + } + }, + "v1beta1.HostPortRange": { + "description": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + "required": [ + "min", + "max" + ], + "properties": { + "max": { + "description": "max is the end of the range, inclusive.", + "type": "integer", + "format": "int32" + }, + "min": { + "description": "min is the start of the range, inclusive.", + "type": "integer", + "format": "int32" + } + } + }, + "v1.Endpoints": { + "description": "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]", + "required": [ + "subsets" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "subsets": { + "description": "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.EndpointSubset" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "Endpoints" + } + ] + }, + "v1.Job": { + "description": "Job represents the configuration of a single job.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.JobSpec" + }, + "status": { + "description": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.JobStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "batch", + "Version": "v1", + "Kind": "Job" + } + ] + }, + "v2alpha1.HorizontalPodAutoscalerList": { + "description": "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "items is the list of horizontal pod autoscaler objects.", + "type": "array", + "items": { + "$ref": "#/definitions/v2alpha1.HorizontalPodAutoscaler" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "metadata is the standard list metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "autoscaling", + "Version": "v2alpha1", + "Kind": "HorizontalPodAutoscalerList" + } + ] + }, + "v1.LimitRangeItem": { + "description": "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.", + "properties": { + "default": { + "description": "Default resource requirement limit value by resource name if resource limit is omitted.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "defaultRequest": { + "description": "DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "max": { + "description": "Max usage constraints on this kind by resource name.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "maxLimitRequestRatio": { + "description": "MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "min": { + "description": "Min usage constraints on this kind by resource name.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "type": { + "description": "Type of resource that this limit applies to.", + "type": "string" + } + } + }, + "v1.SubjectAccessReview": { + "description": "SubjectAccessReview checks whether or not a user or group can perform an action.", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated", + "$ref": "#/definitions/v1.SubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/v1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "authorization.k8s.io", + "Version": "v1", + "Kind": "SubjectAccessReview" + } + ] + }, + "v1beta1.PodDisruptionBudgetStatus": { + "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", + "required": [ + "disruptedPods", + "disruptionsAllowed", + "currentHealthy", + "desiredHealthy", + "expectedPods" + ], + "properties": { + "currentHealthy": { + "description": "current number of healthy pods", + "type": "integer", + "format": "int32" + }, + "desiredHealthy": { + "description": "minimum desired number of healthy pods", + "type": "integer", + "format": "int32" + }, + "disruptedPods": { + "description": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", + "type": "object", + "additionalProperties": { + "type": "string", + "format": "date-time" + } + }, + "disruptionsAllowed": { + "description": "Number of pod disruptions that are currently allowed.", + "type": "integer", + "format": "int32" + }, + "expectedPods": { + "description": "total number of pods counted by this disruption budget", + "type": "integer", + "format": "int32" + }, + "observedGeneration": { + "description": "Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status informatio is valid only if observedGeneration equals to PDB's object generation.", + "type": "integer", + "format": "int64" + } + } + }, + "v1.ResourceAttributes": { + "description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", + "properties": { + "group": { + "description": "Group is the API Group of the Resource. \"*\" means all.", + "type": "string" + }, + "name": { + "description": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", + "type": "string" + }, + "namespace": { + "description": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview", + "type": "string" + }, + "resource": { + "description": "Resource is one of the existing resource types. \"*\" means all.", + "type": "string" + }, + "subresource": { + "description": "Subresource is one of the existing resource types. \"\" means none.", + "type": "string" + }, + "verb": { + "description": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + "type": "string" + }, + "version": { + "description": "Version is the API Version of the Resource. \"*\" means all.", + "type": "string" + } + } + }, + "v1.ConfigMapVolumeSource": { + "description": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", + "properties": { + "defaultMode": { + "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or it's keys must be defined", + "type": "boolean" + } + } + }, + "v1.HTTPHeader": { + "description": "HTTPHeader describes a custom header to be used in HTTP probes", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "description": "The header field name", + "type": "string" + }, + "value": { + "description": "The header field value", + "type": "string" + } + } + }, + "v1.ReplicationController": { + "description": "ReplicationController represents the configuration of a replication controller.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the specification of the desired behavior of the replication controller. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.ReplicationControllerSpec" + }, + "status": { + "description": "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.ReplicationControllerStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "ReplicationController" + } + ] + }, + "v1.APIGroupList": { + "description": "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", + "required": [ + "groups" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "groups": { + "description": "groups is a list of APIGroup.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.APIGroup" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + } + } + }, + "v1beta1.NetworkPolicy": { + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior for this NetworkPolicy.", + "$ref": "#/definitions/v1beta1.NetworkPolicySpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "NetworkPolicy" + } + ] + }, + "apps.v1beta1.RollingUpdateDeployment": { + "description": "Spec to control the desired behavior of rolling update.", + "properties": { + "maxSurge": { + "description": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", + "type": "string", + "format": "int-or-string" + }, + "maxUnavailable": { + "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + "type": "string", + "format": "int-or-string" + } + } + }, + "v1beta1.ReplicaSetStatus": { + "description": "ReplicaSetStatus represents the current status of a ReplicaSet.", + "required": [ + "replicas" + ], + "properties": { + "availableReplicas": { + "description": "The number of available replicas (ready for at least minReadySeconds) for this replica set.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Represents the latest available observations of a replica set's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.ReplicaSetCondition" + } + }, + "fullyLabeledReplicas": { + "description": "The number of pods that have labels matching the labels of the pod template of the replicaset.", + "type": "integer", + "format": "int32" + }, + "observedGeneration": { + "description": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "The number of ready replicas for this replica set.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Replicas is the most recently oberved number of replicas. More info: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller", + "type": "integer", + "format": "int32" + } + } + }, + "v1.HTTPGetAction": { + "description": "HTTPGetAction describes an action based on HTTP Get requests.", + "required": [ + "port" + ], + "properties": { + "host": { + "description": "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", + "type": "string" + }, + "httpHeaders": { + "description": "Custom headers to set in the request. HTTP allows repeated headers.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.HTTPHeader" + } + }, + "path": { + "description": "Path to access on the HTTP server.", + "type": "string" + }, + "port": { + "description": "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + "type": "string", + "format": "int-or-string" + }, + "scheme": { + "description": "Scheme to use for connecting to the host. Defaults to HTTP.", + "type": "string" + } + } + }, + "v1.Affinity": { + "description": "Affinity is a group of affinity scheduling rules.", + "properties": { + "nodeAffinity": { + "description": "Describes node affinity scheduling rules for the pod.", + "$ref": "#/definitions/v1.NodeAffinity" + }, + "podAffinity": { + "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", + "$ref": "#/definitions/v1.PodAffinity" + }, + "podAntiAffinity": { + "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", + "$ref": "#/definitions/v1.PodAntiAffinity" + } + } + }, + "v1.APIGroup": { + "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", + "required": [ + "name", + "versions", + "serverAddressByClientCIDRs" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "name is the name of the group.", + "type": "string" + }, + "preferredVersion": { + "description": "preferredVersion is the version preferred by the API server, which probably is the storage version.", + "$ref": "#/definitions/v1.GroupVersionForDiscovery" + }, + "serverAddressByClientCIDRs": { + "description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ServerAddressByClientCIDR" + } + }, + "versions": { + "description": "versions are the versions supported in this group.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.GroupVersionForDiscovery" + } + } + } + }, + "v1.ComponentCondition": { + "description": "Information about the condition of a component.", + "required": [ + "type", + "status" + ], + "properties": { + "error": { + "description": "Condition error code for a component. For example, a health check error code.", + "type": "string" + }, + "message": { + "description": "Message about the condition for a component. For example, information about a health check.", + "type": "string" + }, + "status": { + "description": "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", + "type": "string" + }, + "type": { + "description": "Type of condition for a component. Valid value: \"Healthy\"", + "type": "string" + } + } + }, + "v1.ReplicationControllerCondition": { + "description": "ReplicationControllerCondition describes the state of a replication controller at a certain point.", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "The last time the condition transitioned from one status to another.", + "type": "string", + "format": "date-time" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of replication controller condition.", + "type": "string" + } + } + }, + "v1.APIVersions": { + "description": "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", + "required": [ + "versions", + "serverAddressByClientCIDRs" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "serverAddressByClientCIDRs": { + "description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ServerAddressByClientCIDR" + } + }, + "versions": { + "description": "versions are the api versions that are available.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1beta1.CertificateSigningRequest": { + "description": "Describes a certificate signing request", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "The certificate request itself and any additional information.", + "$ref": "#/definitions/v1beta1.CertificateSigningRequestSpec" + }, + "status": { + "description": "Derived information about the request.", + "$ref": "#/definitions/v1beta1.CertificateSigningRequestStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "certificates.k8s.io", + "Version": "v1beta1", + "Kind": "CertificateSigningRequest" + } + ] + }, + "v2alpha1.ObjectMetricStatus": { + "description": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", + "required": [ + "target", + "metricName", + "currentValue" + ], + "properties": { + "currentValue": { + "description": "currentValue is the current value of the metric (as a quantity).", + "type": "string" + }, + "metricName": { + "description": "metricName is the name of the metric in question.", + "type": "string" + }, + "target": { + "description": "target is the described Kubernetes object.", + "$ref": "#/definitions/v2alpha1.CrossVersionObjectReference" + } + } + }, + "v1beta1.LocalSubjectAccessReview": { + "description": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", + "$ref": "#/definitions/v1beta1.SubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/v1beta1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "authorization.k8s.io", + "Version": "v1beta1", + "Kind": "LocalSubjectAccessReview" + } + ] + }, + "v1.WatchEvent": { + "description": "Event represents a single event to a watched resource.", + "required": [ + "type", + "object" + ], + "properties": { + "object": { + "description": "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", + "$ref": "#/definitions/runtime.RawExtension" + }, + "type": { + "type": "string" + } + } + }, + "v1.CinderVolumeSource": { + "description": "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", + "required": [ + "volumeID" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "type": "boolean" + }, + "volumeID": { + "description": "volume id used to identify the volume in cinder More info: http://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "type": "string" + } + } + }, + "v1.ResourceQuota": { + "description": "ResourceQuota sets aggregate quota restrictions enforced per namespace", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the desired quota. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.ResourceQuotaSpec" + }, + "status": { + "description": "Status defines the actual enforced quota and its current usage. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.ResourceQuotaStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "ResourceQuota" + } + ] + }, + "v1.LimitRange": { + "description": "LimitRange sets resource usage limits for each kind of resource in a Namespace.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the limits enforced. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.LimitRangeSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "LimitRange" + } + ] + }, + "v1beta1.DaemonSetList": { + "description": "DaemonSetList is a collection of daemon sets.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "A list of daemon sets.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.DaemonSet" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "DaemonSetList" + } + ] + }, + "apps.v1beta1.Scale": { + "description": "Scale represents a scaling request for a resource.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status.", + "$ref": "#/definitions/apps.v1beta1.ScaleSpec" + }, + "status": { + "description": "current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only.", + "$ref": "#/definitions/apps.v1beta1.ScaleStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "apps", + "Version": "v1beta1", + "Kind": "Scale" + } + ] + }, + "v1.PodTemplateList": { + "description": "PodTemplateList is a list of PodTemplates.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of pod templates", + "type": "array", + "items": { + "$ref": "#/definitions/v1.PodTemplate" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "PodTemplateList" + } + ] + }, + "v1beta1.RollingUpdateDaemonSet": { + "description": "Spec to control the desired behavior of daemon set rolling update.", + "properties": { + "maxUnavailable": { + "description": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.", + "type": "string", + "format": "int-or-string" + } + } + }, + "v1.PodAffinityTerm": { + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key tches that of any node on which a pod of the set of pods is running", + "properties": { + "labelSelector": { + "description": "A label query over a set of resources, in this case pods.", + "$ref": "#/definitions/v1.LabelSelector" + }, + "namespaces": { + "description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"", + "type": "array", + "items": { + "type": "string" + } + }, + "topologyKey": { + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.", + "type": "string" + } + } + }, + "v1beta1.PodDisruptionBudget": { + "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the PodDisruptionBudget.", + "$ref": "#/definitions/v1beta1.PodDisruptionBudgetSpec" + }, + "status": { + "description": "Most recently observed status of the PodDisruptionBudget.", + "$ref": "#/definitions/v1beta1.PodDisruptionBudgetStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "policy", + "Version": "v1beta1", + "Kind": "PodDisruptionBudget" + } + ] + }, + "v1.VolumeMount": { + "description": "VolumeMount describes a mounting of a Volume within a container.", + "required": [ + "name", + "mountPath" + ], + "properties": { + "mountPath": { + "description": "Path within the container at which the volume should be mounted. Must not contain ':'.", + "type": "string" + }, + "name": { + "description": "This must match the Name of a Volume.", + "type": "string" + }, + "readOnly": { + "description": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", + "type": "boolean" + }, + "subPath": { + "description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", + "type": "string" + } + } + }, + "v1beta1.ClusterRole": { + "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", + "required": [ + "rules" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "rules": { + "description": "Rules holds all the PolicyRules for this ClusterRole", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.PolicyRule" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1beta1", + "Kind": "ClusterRole" + } + ] + }, + "v1.PersistentVolumeStatus": { + "description": "PersistentVolumeStatus is the current status of a persistent volume.", + "properties": { + "message": { + "description": "A human-readable message indicating details about why the volume is in this state.", + "type": "string" + }, + "phase": { + "description": "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#phase", + "type": "string" + }, + "reason": { + "description": "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", + "type": "string" + } + } + }, + "v1.SelfSubjectAccessReview": { + "description": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated. user and groups must be empty", + "$ref": "#/definitions/v1.SelfSubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/v1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "authorization.k8s.io", + "Version": "v1", + "Kind": "SelfSubjectAccessReview" + } + ] + }, + "v1alpha1.RoleBinding": { + "description": "RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.", + "required": [ + "subjects", + "roleRef" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "roleRef": { + "description": "RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", + "$ref": "#/definitions/v1alpha1.RoleRef" + }, + "subjects": { + "description": "Subjects holds references to the objects the role applies to.", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1.Subject" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1alpha1", + "Kind": "RoleBinding" + } + ] + }, + "extensions.v1beta1.RollbackConfig": { + "properties": { + "revision": { + "description": "The revision to rollback to. If set to 0, rollbck to the last revision.", + "type": "integer", + "format": "int64" + } + } + }, + "v1beta1.NetworkPolicyPeer": { + "properties": { + "namespaceSelector": { + "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces.", + "$ref": "#/definitions/v1.LabelSelector" + }, + "podSelector": { + "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace.", + "$ref": "#/definitions/v1.LabelSelector" + } + } + }, + "v1.PodList": { + "description": "PodList is a list of Pods.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of pods. More info: http://kubernetes.io/docs/user-guide/pods", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Pod" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "PodList" + } + ] + }, + "v1.NodeStatus": { + "description": "NodeStatus is information about the current status of a node.", + "properties": { + "addresses": { + "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-addresses", + "type": "array", + "items": { + "$ref": "#/definitions/v1.NodeAddress" + } + }, + "allocatable": { + "description": "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "capacity": { + "description": "Capacity represents the total resources of a node. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#capacity for more details.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "conditions": { + "description": "Conditions is an array of current observed node conditions. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-condition", + "type": "array", + "items": { + "$ref": "#/definitions/v1.NodeCondition" + } + }, + "daemonEndpoints": { + "description": "Endpoints of daemons running on the Node.", + "$ref": "#/definitions/v1.NodeDaemonEndpoints" + }, + "images": { + "description": "List of container images on this node", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ContainerImage" + } + }, + "nodeInfo": { + "description": "Set of ids/uuids to uniquely identify the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-info", + "$ref": "#/definitions/v1.NodeSystemInfo" + }, + "phase": { + "description": "NodePhase is the recently observed lifecycle phase of the node. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#node-phase The field is never populated, and now is deprecated.", + "type": "string" + }, + "volumesAttached": { + "description": "List of volumes that are attached to the node.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.AttachedVolume" + } + }, + "volumesInUse": { + "description": "List of attachable volumes in use (mounted) by the node.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.EventList": { + "description": "EventList is a list of events.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of events", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Event" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "EventList" + } + ] + }, + "v1.HostPathVolumeSource": { + "description": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", + "required": [ + "path" + ], + "properties": { + "path": { + "description": "Path of the directory on the host. More info: http://kubernetes.io/docs/user-guide/volumes#hostpath", + "type": "string" + } + } + }, + "v1.ExecAction": { + "description": "ExecAction describes a \"run in container\" action.", + "properties": { + "command": { + "description": "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.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.ContainerStateRunning": { + "description": "ContainerStateRunning is a running state of a container.", + "properties": { + "startedAt": { + "description": "Time at which the container was last (re-)started", + "type": "string", + "format": "date-time" + } + } + }, + "v1alpha1.PodPresetSpec": { + "description": "PodPresetSpec is a description of a pod injection policy.", + "properties": { + "env": { + "description": "Env defines the collection of EnvVar to inject into containers.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.EnvVar" + } + }, + "envFrom": { + "description": "EnvFrom defines the collection of EnvFromSource to inject into containers.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.EnvFromSource" + } + }, + "selector": { + "description": "Selector is a label query over a set of resources, in this case pods. Required.", + "$ref": "#/definitions/v1.LabelSelector" + }, + "volumeMounts": { + "description": "VolumeMounts defines the collection of VolumeMount to inject into containers.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.VolumeMount" + } + }, + "volumes": { + "description": "Volumes defines the collection of Volume to inject into the pod.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Volume" + } + } + } + }, + "v1beta1.PodSecurityPolicy": { + "description": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "spec defines the policy enforced.", + "$ref": "#/definitions/v1beta1.PodSecurityPolicySpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "PodSecurityPolicy" + } + ] + }, + "v1.PodStatus": { + "description": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.", + "properties": { + "conditions": { + "description": "Current service state of pod. More info: http://kubernetes.io/docs/user-guide/pod-states#pod-conditions", + "type": "array", + "items": { + "$ref": "#/definitions/v1.PodCondition" + } + }, + "containerStatuses": { + "description": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ContainerStatus" + } + }, + "hostIP": { + "description": "IP address of the host to which the pod is assigned. Empty if not yet scheduled.", + "type": "string" + }, + "initContainerStatuses": { + "description": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ContainerStatus" + } + }, + "message": { + "description": "A human readable message indicating details about why the pod is in this condition.", + "type": "string" + }, + "phase": { + "description": "Current condition of the pod. More info: http://kubernetes.io/docs/user-guide/pod-states#pod-phase", + "type": "string" + }, + "podIP": { + "description": "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", + "type": "string" + }, + "qosClass": { + "description": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md", + "type": "string" + }, + "reason": { + "description": "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk'", + "type": "string" + }, + "startTime": { + "description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", + "type": "string", + "format": "date-time" + } + } + }, + "v1.NodeSelector": { + "description": "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.", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "description": "Required. A list of node selector terms. The terms are ORed.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.NodeSelectorTerm" + } + } + } + }, + "v1.PodTemplateSpec": { + "description": "PodTemplateSpec describes the data a pod should have when created from a template", + "properties": { + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the pod. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.PodSpec" + } + } + }, + "apps.v1beta1.DeploymentStrategy": { + "description": "DeploymentStrategy describes how to replace existing pods with new ones.", + "properties": { + "rollingUpdate": { + "description": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", + "$ref": "#/definitions/apps.v1beta1.RollingUpdateDeployment" + }, + "type": { + "description": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", + "type": "string" + } + } + }, + "v1beta1.PodDisruptionBudgetSpec": { + "description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", + "properties": { + "minAvailable": { + "description": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", + "type": "string", + "format": "int-or-string" + }, + "selector": { + "description": "Label query over pods whose evictions are managed by the disruption budget.", + "$ref": "#/definitions/v1.LabelSelector" + } + } + }, + "v1.NodeAffinity": { + "description": "Node affinity is a group of node affinity scheduling rules.", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.PreferredSchedulingTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.", + "$ref": "#/definitions/v1.NodeSelector" + } + } + }, + "v1beta1.ThirdPartyResourceList": { + "description": "ThirdPartyResourceList is a list of ThirdPartyResources.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of ThirdPartyResources.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.ThirdPartyResource" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "ThirdPartyResourceList" + } + ] + }, + "v1beta1.StorageClass": { + "description": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", + "required": [ + "provisioner" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "parameters": { + "description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "provisioner": { + "description": "Provisioner indicates the type of the provisioner.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "storage.k8s.io", + "Version": "v1beta1", + "Kind": "StorageClass" + } + ] + }, + "v1beta1.IngressBackend": { + "description": "IngressBackend describes all endpoints for a given service and port.", + "required": [ + "serviceName", + "servicePort" + ], + "properties": { + "serviceName": { + "description": "Specifies the name of the referenced service.", + "type": "string" + }, + "servicePort": { + "description": "Specifies the port of the referenced service.", + "type": "string", + "format": "int-or-string" + } + } + }, + "v1beta1.RoleList": { + "description": "RoleList is a collection of Roles", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of Roles", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.Role" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1beta1", + "Kind": "RoleList" + } + ] + }, + "v1.Pod": { + "description": "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the pod. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.PodSpec" + }, + "status": { + "description": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.PodStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "Pod" + } + ] + }, + "v1.NodeSpec": { + "description": "NodeSpec describes the attributes that a node is created with.", + "properties": { + "externalID": { + "description": "External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated.", + "type": "string" + }, + "podCIDR": { + "description": "PodCIDR represents the pod IP range assigned to the node.", + "type": "string" + }, + "providerID": { + "description": "ID of the node assigned by the cloud provider in the format: ://", + "type": "string" + }, + "taints": { + "description": "If specified, the node's taints.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Taint" + } + }, + "unschedulable": { + "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration", + "type": "boolean" + } + } + }, + "v1.CephFSVolumeSource": { + "description": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", + "required": [ + "monitors" + ], + "properties": { + "monitors": { + "description": "Required: Monitors is a collection of Ceph monitors More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "path": { + "description": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "type": "boolean" + }, + "secretFile": { + "description": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "type": "string" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "user": { + "description": "Optional: User is the rados user name, default is admin More info: http://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "type": "string" + } + } + }, + "v1.PersistentVolumeClaimVolumeSource": { + "description": "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).", + "required": [ + "claimName" + ], + "properties": { + "claimName": { + "description": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#persistentvolumeclaims", + "type": "string" + }, + "readOnly": { + "description": "Will force the ReadOnly setting in VolumeMounts. Default false.", + "type": "boolean" + } + } + }, + "v1beta1.HTTPIngressPath": { + "description": "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.", + "required": [ + "backend" + ], + "properties": { + "backend": { + "description": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", + "$ref": "#/definitions/v1beta1.IngressBackend" + }, + "path": { + "description": "Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.", + "type": "string" + } + } + }, + "v2alpha1.HorizontalPodAutoscalerStatus": { + "description": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", + "required": [ + "currentReplicas", + "desiredReplicas", + "currentMetrics" + ], + "properties": { + "currentMetrics": { + "description": "currentMetrics is the last read state of the metrics used by this autoscaler.", + "type": "array", + "items": { + "$ref": "#/definitions/v2alpha1.MetricStatus" + } + }, + "currentReplicas": { + "description": "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", + "type": "integer", + "format": "int32" + }, + "desiredReplicas": { + "description": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.", + "type": "integer", + "format": "int32" + }, + "lastScaleTime": { + "description": "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.", + "type": "string", + "format": "date-time" + }, + "observedGeneration": { + "description": "observedGeneration is the most recent generation observed by this autoscaler.", + "type": "integer", + "format": "int64" + } + } + }, + "v1.ContainerStateTerminated": { + "description": "ContainerStateTerminated is a terminated state of a container.", + "required": [ + "exitCode" + ], + "properties": { + "containerID": { + "description": "Container's ID in the format 'docker://'", + "type": "string" + }, + "exitCode": { + "description": "Exit status from the last termination of the container", + "type": "integer", + "format": "int32" + }, + "finishedAt": { + "description": "Time at which the container last terminated", + "type": "string", + "format": "date-time" + }, + "message": { + "description": "Message regarding the last termination of the container", + "type": "string" + }, + "reason": { + "description": "(brief) reason from the last termination of the container", + "type": "string" + }, + "signal": { + "description": "Signal from the last termination of the container", + "type": "integer", + "format": "int32" + }, + "startedAt": { + "description": "Time at which previous execution of the container started", + "type": "string", + "format": "date-time" + } + } + }, + "v1beta1.NetworkPolicyList": { + "description": "Network Policy List is a list of NetworkPolicy objects.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of schema objects.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.NetworkPolicy" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "extensions", + "Version": "v1beta1", + "Kind": "NetworkPolicyList" + } + ] + }, + "v1.NodeSelectorRequirement": { + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "description": "The label key that the selector applies to.", + "type": "string" + }, + "operator": { + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", + "type": "string" + }, + "values": { + "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1beta1.SubjectAccessReviewStatus": { + "description": "SubjectAccessReviewStatus", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "description": "Allowed is required. True if the action would be allowed, false otherwise.", + "type": "boolean" + }, + "evaluationError": { + "description": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", + "type": "string" + }, + "reason": { + "description": "Reason is optional. It indicates why a request was allowed or denied.", + "type": "string" + } + } + }, + "v1.RBDVolumeSource": { + "description": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", + "required": [ + "monitors", + "image" + ], + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: http://kubernetes.io/docs/user-guide/volumes#rbd", + "type": "string" + }, + "image": { + "description": "The rados image name. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "keyring": { + "description": "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "monitors": { + "description": "A collection of Ceph monitors. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "pool": { + "description": "The rados pool name. Default is rbd. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it.", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "user": { + "description": "The rados user name. Default is admin. More info: http://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "type": "string" + } + } + }, + "v1.HorizontalPodAutoscalerSpec": { + "description": "specification of a horizontal pod autoscaler.", + "required": [ + "scaleTargetRef", + "maxReplicas" + ], + "properties": { + "maxReplicas": { + "description": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", + "type": "integer", + "format": "int32" + }, + "minReplicas": { + "description": "lower limit for the number of pods that can be set by the autoscaler, default 1.", + "type": "integer", + "format": "int32" + }, + "scaleTargetRef": { + "description": "reference to scaled resource; horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.", + "$ref": "#/definitions/v1.CrossVersionObjectReference" + }, + "targetCPUUtilizationPercentage": { + "description": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.", + "type": "integer", + "format": "int32" + } + } + }, + "v1beta1.StorageClassList": { + "description": "StorageClassList is a collection of storage classes.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of StorageClasses", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.StorageClass" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "storage.k8s.io", + "Version": "v1beta1", + "Kind": "StorageClassList" + } + ] + }, + "extensions.v1beta1.DeploymentCondition": { + "description": "DeploymentCondition describes the state of a deployment at a certain point.", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "type": "string", + "format": "date-time" + }, + "lastUpdateTime": { + "description": "The last time this condition was updated.", + "type": "string", + "format": "date-time" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of deployment condition.", + "type": "string" + } + } + }, + "v1.DownwardAPIVolumeFile": { + "description": "DownwardAPIVolumeFile represents information to create the file containing the pod field", + "required": [ + "path" + ], + "properties": { + "fieldRef": { + "description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", + "$ref": "#/definitions/v1.ObjectFieldSelector" + }, + "mode": { + "description": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "path": { + "description": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", + "type": "string" + }, + "resourceFieldRef": { + "description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", + "$ref": "#/definitions/v1.ResourceFieldSelector" + } + } + }, + "v1.PreferredSchedulingTerm": { + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "required": [ + "weight", + "preference" + ], + "properties": { + "preference": { + "description": "A node selector term, associated with the corresponding weight.", + "$ref": "#/definitions/v1.NodeSelectorTerm" + }, + "weight": { + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", + "type": "integer", + "format": "int32" + } + } + }, + "v1.NodeSelectorTerm": { + "description": "A null or empty node selector term matches no objects.", + "required": [ + "matchExpressions" + ], + "properties": { + "matchExpressions": { + "description": "Required. A list of node selector requirements. The requirements are ANDed.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.NodeSelectorRequirement" + } + } + } + }, + "v1.LabelSelectorRequirement": { + "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "description": "key is the label key that the selector applies to.", + "type": "string" + }, + "operator": { + "description": "operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.", + "type": "string" + }, + "values": { + "description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.GlusterfsVolumeSource": { + "description": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + "required": [ + "endpoints", + "path" + ], + "properties": { + "endpoints": { + "description": "EndpointsName is the endpoint name that details Glusterfs topology. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "path": { + "description": "Path is the Glusterfs volume path. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: http://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", + "type": "boolean" + } + } + }, + "apps.v1beta1.DeploymentList": { + "description": "DeploymentList is a list of Deployments.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of Deployments.", + "type": "array", + "items": { + "$ref": "#/definitions/apps.v1beta1.Deployment" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "apps", + "Version": "v1beta1", + "Kind": "DeploymentList" + } + ] + }, + "v1beta1.SupplementalGroupsStrategyOptions": { + "description": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", + "properties": { + "ranges": { + "description": "Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.IDRange" + } + }, + "rule": { + "description": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", + "type": "string" + } + } + }, + "v1.ServiceList": { + "description": "ServiceList holds a list of services.", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of services", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Service" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "ServiceList" + } + ] + }, + "v1.Node": { + "description": "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the behavior of a node. http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.NodeSpec" + }, + "status": { + "description": "Most recently observed status of the node. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1.NodeStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "", + "Version": "v1", + "Kind": "Node" + } + ] + }, + "v1.Container": { + "description": "A single application container that you want to run within a pod.", + "required": [ + "name" + ], + "properties": { + "args": { + "description": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands", + "type": "array", + "items": { + "type": "string" + } + }, + "command": { + "description": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers#containers-and-commands", + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "description": "List of environment variables to set in the container. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.EnvVar" + } + }, + "envFrom": { + "description": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.EnvFromSource" + } + }, + "image": { + "description": "Docker image name. More info: http://kubernetes.io/docs/user-guide/images", + "type": "string" + }, + "imagePullPolicy": { + "description": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/images#updating-images", + "type": "string" + }, + "lifecycle": { + "description": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", + "$ref": "#/definitions/v1.Lifecycle" + }, + "livenessProbe": { + "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", + "$ref": "#/definitions/v1.Probe" + }, + "name": { + "description": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", + "type": "string" + }, + "ports": { + "description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ContainerPort" + } + }, + "readinessProbe": { + "description": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/pod-states#container-probes", + "$ref": "#/definitions/v1.Probe" + }, + "resources": { + "description": "Compute Resources required by this container. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources", + "$ref": "#/definitions/v1.ResourceRequirements" + }, + "securityContext": { + "description": "Security options the pod should run with. More info: http://releases.k8s.io/HEAD/docs/design/security_context.md", + "$ref": "#/definitions/v1.SecurityContext" + }, + "stdin": { + "description": "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + "type": "boolean" + }, + "stdinOnce": { + "description": "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + "type": "boolean" + }, + "terminationMessagePath": { + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + "type": "string" + }, + "terminationMessagePolicy": { + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + "type": "string" + }, + "tty": { + "description": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + "type": "boolean" + }, + "volumeMounts": { + "description": "Pod volumes to mount into the container's filesystem. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.VolumeMount" + } + }, + "workingDir": { + "description": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + "type": "string" + } + } + }, + "v1.GitRepoVolumeSource": { + "description": "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.", + "required": [ + "repository" + ], + "properties": { + "directory": { + "description": "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", + "type": "string" + }, + "repository": { + "description": "Repository URL", + "type": "string" + }, + "revision": { + "description": "Commit hash for the specified revision.", + "type": "string" + } + } + }, + "v2alpha1.PodsMetricSource": { + "description": "PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", + "required": [ + "metricName", + "targetAverageValue" + ], + "properties": { + "metricName": { + "description": "metricName is the name of the metric in question", + "type": "string" + }, + "targetAverageValue": { + "description": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", + "type": "string" + } + } + }, + "v1.EndpointPort": { + "description": "EndpointPort is a tuple that describes a single port.", + "required": [ + "port" + ], + "properties": { + "name": { + "description": "The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined.", + "type": "string" + }, + "port": { + "description": "The port number of the endpoint.", + "type": "integer", + "format": "int32" + }, + "protocol": { + "description": "The IP protocol for this port. Must be UDP or TCP. Default is TCP.", + "type": "string" + } + } + }, + "v1beta1.FSGroupStrategyOptions": { + "description": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", + "properties": { + "ranges": { + "description": "Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.IDRange" + } + }, + "rule": { + "description": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", + "type": "string" + } + } + }, + "v1.JobCondition": { + "description": "JobCondition describes current state of a job.", + "required": [ + "type", + "status" + ], + "properties": { + "lastProbeTime": { + "description": "Last time the condition was checked.", + "type": "string", + "format": "date-time" + }, + "lastTransitionTime": { + "description": "Last time the condition transit from one status to another.", + "type": "string", + "format": "date-time" + }, + "message": { + "description": "Human readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "(brief) reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of job condition, Complete or Failed.", + "type": "string" + } + } + }, + "v1beta1.DaemonSetUpdateStrategy": { + "properties": { + "rollingUpdate": { + "description": "Rolling update config params. Present only if type = \"RollingUpdate\".", + "$ref": "#/definitions/v1beta1.RollingUpdateDaemonSet" + }, + "type": { + "description": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete.", + "type": "string" + } + } + }, + "v1beta1.PolicyRule": { + "description": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", + "required": [ + "verbs" + ], + "properties": { + "apiGroups": { + "description": "APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "nonResourceURLs": { + "description": "NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as \"pods\" or \"secrets\") or non-resource URL paths (such as \"/api\"), but not both.", + "type": "array", + "items": { + "type": "string" + } + }, + "resourceNames": { + "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", + "type": "array", + "items": { + "type": "string" + } + }, + "verbs": { + "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.NamespaceStatus": { + "description": "NamespaceStatus is information about the current status of a Namespace.", + "properties": { + "phase": { + "description": "Phase is the current lifecycle phase of the namespace. More info: http://releases.k8s.io/HEAD/docs/design/namespaces.md#phases", + "type": "string" + } + } + }, + "v1beta1.NetworkPolicySpec": { + "required": [ + "podSelector" + ], + "properties": { + "ingress": { + "description": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.NetworkPolicyIngressRule" + } + }, + "podSelector": { + "description": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.", + "$ref": "#/definitions/v1.LabelSelector" + } + } + }, + "v1.PodAntiAffinity": { + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.WeightedPodAffinityTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.PodAffinityTerm" + } + } + } + }, + "v1alpha1.ClusterRoleBindingList": { + "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of ClusterRoleBindings", + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1.ClusterRoleBinding" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata.", + "$ref": "#/definitions/v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "Group": "rbac.authorization.k8s.io", + "Version": "v1alpha1", + "Kind": "ClusterRoleBindingList" + } + ] + }, + "v1.EnvVarSource": { + "description": "EnvVarSource represents a source for the value of an EnvVar.", + "properties": { + "configMapKeyRef": { + "description": "Selects a key of a ConfigMap.", + "$ref": "#/definitions/v1.ConfigMapKeySelector" + }, + "fieldRef": { + "description": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.podIP.", + "$ref": "#/definitions/v1.ObjectFieldSelector" + }, + "resourceFieldRef": { + "description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", + "$ref": "#/definitions/v1.ResourceFieldSelector" + }, + "secretKeyRef": { + "description": "Selects a key of a secret in the pod's namespace", + "$ref": "#/definitions/v1.SecretKeySelector" + } + } + }, + "v1beta1.HTTPIngressRuleValue": { + "description": "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 '#'.", + "required": [ + "paths" + ], + "properties": { + "paths": { + "description": "A collection of paths that map requests to backends.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.HTTPIngressPath" + } + } + } + }, + "v2alpha1.PodsMetricStatus": { + "description": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", + "required": [ + "metricName", + "currentAverageValue" + ], + "properties": { + "currentAverageValue": { + "description": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", + "type": "string" + }, + "metricName": { + "description": "metricName is the name of the metric in question", + "type": "string" + } + } + }, + "v1.LoadBalancerIngress": { + "description": "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.", + "properties": { + "hostname": { + "description": "Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)", + "type": "string" + }, + "ip": { + "description": "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)", + "type": "string" + } + } + }, + "v1beta1.NetworkPolicyPort": { + "properties": { + "port": { + "description": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.", + "type": "string", + "format": "int-or-string" + }, + "protocol": { + "description": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP.", + "type": "string" + } + } + } + }, + "securityDefinitions": { + "BearerToken": { + "description": "Bearer Token authentication", + "type": "apiKey", + "name": "authorization", + "in": "header" + } + }, + "security": [ + { + "BearerToken": [] + } + ] +} \ No newline at end of file From f6433ca252cd91cd62fad533a5f94dc92736a7f3 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Mon, 12 Jun 2017 22:54:30 -0700 Subject: [PATCH 2/2] Add some example code. --- examples/simple/PodList.cs | 21 +++++++++++++++++++++ examples/simple/simple.csproj | 14 ++++++++++++++ 2 files changed, 35 insertions(+) create mode 100755 examples/simple/PodList.cs create mode 100755 examples/simple/simple.csproj diff --git a/examples/simple/PodList.cs b/examples/simple/PodList.cs new file mode 100755 index 000000000..9fa43a07b --- /dev/null +++ b/examples/simple/PodList.cs @@ -0,0 +1,21 @@ +using System; + +using k8s; + +namespace simple +{ + class PodList + { + static void Main(string[] args) + { + IKubernetes client = new Kubernetes(); + client.BaseUri = new Uri("http://localhost:8001"); + var listTask = client.ListNamespacedPodWithHttpMessagesAsync("default"); + listTask.Wait(); + var list = listTask.Result.Body; + foreach (var item in list.Items) { + Console.WriteLine(item.Metadata.Name); + } + } + } +} diff --git a/examples/simple/simple.csproj b/examples/simple/simple.csproj new file mode 100755 index 000000000..e16c63b43 --- /dev/null +++ b/examples/simple/simple.csproj @@ -0,0 +1,14 @@ + + + + + + + + + + Exe + netcoreapp1.1 + + +